From: James Courtier-Dutton <James@superbug.demon.co.uk>
To: alsa-devel@lists.sourceforge.net
Subject: Problems with snd_pcm_status_get_delay()
Date: Wed, 09 Oct 2002 02:25:40 +1000 [thread overview]
Message-ID: <3DA30704.3050000@superbug.demon.co.uk> (raw)
Hello
Can someone please explain to me the use of snd_pcm_status_get_delay()
If a buffer size is 16384, and avail=6384, should delay therefore equil
10000 ? In all cases ?
I have found that in SND_PCM_STATE_RUNNING, delay = buffer_size - avail.
I have found that in SND_PCM_STATE_PREPARED, delay = 0
This causes problems. As one fills the buffer in SND_PCM_STATE_PREPARED
, delay stays at 0, but when the buffer fills enough and moves to state
SND_PCM_STATE_RUNNING, the delay value suddenly jumps to delay =
buffer_size - avail.
This causes problems with applications that need "delay" to be as
accurate as possible at all times.
Is this a bug in alsa09, or should I ignore "delay" and just use the
"buffer_size - avail" value.
Obviously, in SND_PCM_STATE_XRUN, delay is invalid.with avail values
sometimes becoming > buffer_size!
so should not be used.
Cheers
James
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
next reply other threads:[~2002-10-08 16:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-08 16:25 James Courtier-Dutton [this message]
2002-10-08 16:44 ` Problems with snd_pcm_status_get_delay() Takashi Iwai
2002-10-09 6:45 ` Jaroslav Kysela
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=3DA30704.3050000@superbug.demon.co.uk \
--to=james@superbug.demon.co.uk \
--cc=alsa-devel@lists.sourceforge.net \
/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 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.