[alsa-devel] alsa-lib: snd_pcm_delay and friends do not account for a write being currently in progress
John Lindgren
john.lindgren at tds.net
Thu Jun 3 18:16:03 CEST 2010
On Thu, 2010-06-03 at 16:48 +0200, Clemens Ladisch wrote:
> That applies to the kernel code.
>
> Most functions in alsa-lib must not be called at the same time on the
> same device handle. (Don't ask me where this is documented.)
Do you have a problem with patches that improve the current situation?
> > Would it work to simply call snd_pcm_wait?
>
> Yes. (I usually suggest poll because the code that writes audio data
> often wants to be informed of some other event. If your writing loop
> doesn't need to be interrupted, snd_pcm_wait works just fine.)
It is permissible, then, to call snd_pcm_delay during a snd_pcm_wait
call?
What would be the cleanest way to interrupt snd_pcm_wait when we need to
stop the stream? Will snd_pcm_drop work?
John Lindgren
More information about the Alsa-devel
mailing list