13 Nov
2012
13 Nov
'12
9:36 p.m.
On Tue, Nov 13, 2012 at 3:23 PM, Clemens Ladisch clemens@ladisch.de wrote:
Trent Piepho wrote:
Consider snd_pcm_writei(), most of the time is usually spent blocked waiting for a period to elapse. It is perfectly ok to call snd_pcm_delay() during this time. But if one isn't allowed to make any other pcm calls during snd_pcm_writei() then this can't be done.
Then use non-blocking mode. Blocking mode is suitable only for applications that do not want to access the device while waiting.
So you get the same problem with snd_pcm_wait(). Or snd_pcm_drain(). Any alsa-lib function than can block will exclude other threads from alsa-lib for much longer than necessary.