Fixed two major sequencer dispatch bugs.
commitf7d3b242c9738cb93ff2987e1317f14728241f5c
authorEvanR <evanrinehart@gmail.com>
Fri, 16 Jan 2009 03:23:27 +0000 (15 21:23 -0600)
committerEvanR <evanrinehart@gmail.com>
Fri, 16 Jan 2009 03:23:27 +0000 (15 21:23 -0600)
tree890d536ff28f86f5b3b1ad51159dfc3ed1fc9ae6
parentd823267b2d52c44795953f42a52b13b6d3228ce4
Fixed two major sequencer dispatch bugs.

Events are now sorted in time before they are
dispatched. This solves rather large timing errors
in which the kludge was to send all out of order
events and following events on the last index of
the frame buffer.

An arithmetic error was causing ticks and target
frames for events to be off by 1, sometimes. This
mostly caused the above kludge to trigger, but sometimes
resulted in a negative target frame (zero minus one).
That would cause a segfault.

Fixed.
src/jack.cpp
src/seq.cpp