[alsa-devel] pthread or snd_async_add_pcm_handler
Hello,
I am doing MMAP-based full duplex audio processing. I looked at the direct_loop code in the alsa-lib/test/pcm.c example.
Now I want to run do the audio processing asynchronously. The async_direct_loop in the example does this, but I was wondering: is there any advantage to using snd_async_add_pcm_handler over using a simple pthread?
Thanks,
Maarten
Maarten de Boer wrote:
I looked at the direct_loop code in the alsa-lib/test/pcm.c example.
Now I want to run do the audio processing asynchronously. The async_direct_loop in the example does this, but I was wondering: is there any advantage to using snd_async_add_pcm_handler over using a simple pthread?
No; the async handler is neither portable nor recommended. That test program ist just for testing the API.
Regards, Clemens
participants (2)
-
Clemens Ladisch
-
Maarten de Boer