On Tue, Jul 20, 2010 at 7:48 AM, Patrick Shirkey
<pshirkey(a)boosthardware.com> wrote:
A simple
approach might be to just set a counter and have the
audio-process count it down (in audio-samples). Once it reaches zero:
play again.
The problem is how to set a counter that doesn't block the rest of the app
while it is in process.
i believe that robin's suggestion is the correct one. you don't want
to attempt audio timing using the system clock unless you have a
DLL/PLL that relates audio time to system time (and you don't).
decisions about what to do as time progresses need to be made in the
process() callback tree, not in the GUI or some other thread.
so just countdown some number of samples, and then resume playing, as
robin suggested. it won't block anything, anywhere.