[alsa-devel] Misusing snd_pcm_avail_update()

James Courtier-Dutton james.dutton at gmail.com
Fri Jan 23 19:49:49 CET 2009


2009/1/21 Takashi Iwai <tiwai at suse.de>:
> At Tue, 20 Jan 2009 21:29:34 +0100,
> Lennart Poettering wrote:
>>
>> I called the prototype "busy for" since effectively the value I am
>> looking for is the time the card will be busy with the data it already
>> has, and doesn't need any new data.
>
> Isn't it snd_pcm_delay() that was originally designed for?
> Did you check my previous patch?
>

No. snd_pcm_delay() was designed for aiding audio/video sync.
I.e. If I write a sample to the buffer now, it will play on the
speakers in X samples time.
In this way, if I have a sample that must play in X samples time, I
write it now.
If I have a sample that must play in X+3 samples time, I add 3 samples
of padding first.


More information about the Alsa-devel mailing list