All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: snd_pcm_wait function
@ 2012-11-12  7:23 Enno Fennema
  2012-11-12  7:36 ` Clemens Ladisch
  0 siblings, 1 reply; 9+ messages in thread
From: Enno Fennema @ 2012-11-12  7:23 UTC (permalink / raw)
  To: clemens; +Cc: alsa-devel, daniellsanz2

Thanks for your reply. I may not have expressed myself clearly. I appear 
to have the opposite problem from Daniel Sanz re Non-blocking 
snd_pcm_drain (also posted 10 Nov). He wants the new sound to start 
immediately. I want to close the pcm AFTER the sound finished.

The docs say calling drain() puts the pcm in the DRAINING state. When I 
obtain the state immediately after drain() it is already SETUP.
I hoped a state change from DRAINING to SETUP  would be the right time 
to close the pcm but there appears to be no such state change.

Currently I solved my problem by a usleep() based on an estimate of the 
time needed to finish playing the last samples in the buffer.

If there is a more elegant way I would like to know. Otherwise I will 
stick with usleep(),

Regards,
Enno

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-11-19 11:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-12  7:23 snd_pcm_wait function Enno Fennema
2012-11-12  7:36 ` Clemens Ladisch
2012-11-12 20:57   ` Trent Piepho
2012-11-13  0:15     ` Daniel Sanz
2012-11-13  4:45       ` Trent Piepho
2012-11-16 10:41         ` Daniel Sanz
2012-11-16 16:27           ` snd_pcm_wait function (really snd_pcm_draiin) Enno Fennema
2012-11-16 19:10             ` David Henningsson
2012-11-19 11:10               ` Daniel Sanz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.