Re: [PATCH] alsa-lib: snd_pcm_delay and friends do not account for a write being currently in progress

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



John Lindgren wrote:
> On Thu, 2010-06-03 at 08:40 +0200, Clemens Ladisch wrote:
> > Alsa-lib is not thread safe.
> 
> From http://alsa-project.org/main/index.php/Main_Page:
> 
>         ALSA has the following significant features:
>         ...
>         SMP and thread-safe design.
> 
> So, that's a big lie?

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.)

> > ... poll()
> 
> 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.)


Regards,
Clemens
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel


[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux