From: Enno Fennema <ennofennema@tele2.nl>
To: clemens@ladisch.de
Cc: alsa-devel@alsa-project.org, daniellsanz2@gmail.com
Subject: Re: snd_pcm_wait function
Date: Mon, 12 Nov 2012 08:23:42 +0100 [thread overview]
Message-ID: <50A0A3FE.4090901@tele2.nl> (raw)
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
next reply other threads:[~2012-11-12 7:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-12 7:23 Enno Fennema [this message]
2012-11-12 7:36 ` snd_pcm_wait function 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
-- strict thread matches above, loose matches on Subject: below --
2012-11-10 16:43 snd_pcm_wait function Enno Fennema
2012-11-10 17:20 ` Clemens Ladisch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50A0A3FE.4090901@tele2.nl \
--to=ennofennema@tele2.nl \
--cc=alsa-devel@alsa-project.org \
--cc=clemens@ladisch.de \
--cc=daniellsanz2@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox