Re: [LAD] Can someone add 2 features to Kluppe?

From: Paul Davis <paul@email-addr-hidden>
Date: Tue Jul 20 2010 - 14:51:44 EEST

On Tue, Jul 20, 2010 at 7:48 AM, Patrick Shirkey
<pshirkey@email-addr-hidden> 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.
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Tue Jul 20 16:15:02 2010

This archive was generated by hypermail 2.1.8 : Tue Jul 20 2010 - 16:15:02 EEST