3 #include "transportque.inc"
5 PanAutos::PanAutos(EDL *edl, Track *track)
15 Auto* PanAutos::new_auto()
17 return new PanAuto(edl, this);
20 void PanAutos::get_handle(int &handle_x,
27 previous = (PanAuto*)get_prev_auto(position, direction, (Auto*)previous);
28 next = (PanAuto*)get_next_auto(position, direction, (Auto*)next);
31 if(previous->handle_x == next->handle_x &&
32 previous->handle_y == next->handle_y)
34 handle_x = previous->handle_x;
35 handle_y = previous->handle_y;
40 int64_t total = labs(next->position - previous->position);
42 if(direction == PLAY_FORWARD)
44 fraction = (double)(position - previous->position) / total;
48 fraction = (double)(previous->position - position) / total;
51 handle_x = (int)(previous->handle_x + (next->handle_x - previous->handle_x) * fraction);
52 handle_y = (int)(previous->handle_y + (next->handle_y - previous->handle_y) * fraction);
57 printf(" PanAutos::dump %p\n", this);
58 printf(" Default: position %ld\n", default_auto->position);
59 ((PanAuto*)default_auto)->dump();
60 for(Auto* current = first; current; current = NEXT)
62 printf(" position %ld\n", current->position);
63 ((PanAuto*)current)->dump();