[alsa-devel] snd_pcm_wait function (really snd_pcm_draiin)
Enno Fennema
ennofennema at tele2.nl
Fri Nov 16 17:27:07 CET 2012
On 11/16/12 11:41, Daniel Sanz wrote:
> Thanks, Trent, I've been playing a bit with snd_pcm_drain,
> snd_pcm_writei, blocking mode, non-blocking mode, etc. but even if I
> ...
I wanted to play a short sound and release the pcm. It works with a
non-block drain as Clemens suggested.
I noticed using gettimeofday() around drain() that it takes a bit over 2
seconds. Rather long for a sound that only takes 0.1 sec.
Not draining aand a usleep() for 0.1 sec plays the full time and
releases the cpm quicker. As you see in attached example I don't bother
with periods either.
Not exactly your question but I have given up on drainage for my current
application.
Regards,
Enno Fennema
-------------- next part --------------
A non-text attachment was scrubbed...
Name: drain.c
Type: text/x-csrc
Size: 865 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20121116/44798555/attachment.bin>
More information about the Alsa-devel
mailing list