Hello folks,
I'm writing a realtime audio tool and I'd like to pick your brains on the
following: say my app is rendering some sound and a midi event comes in, at
what point in time should the resulting effect occur in the rendered audio
stream?
The obvious solution would be to measure world/system time at the moment
playback is started in my application. If a midi event then comes in, I can
subtract this start time from the midi event time. I am however afraid that
my timing will then drift each time an underrun occurs. I'm pretty sure
applications like terminatorx, sweep and a host of others solved this
problem before me so if anybody knows the answer to this, please let me
know!
Regards,
Denis
p.s. I use JACK for audio output but the solution really should be
independent of this.
---------------
www.cyozlab.com
_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
http://join.msn.com/?page=features/virus