[alsa-devel] What does snd_pcm_delay() actually return?
Colin Guthrie
gmane at colin.guthr.ie
Fri Jun 13 14:44:42 CEST 2008
James Courtier-Dutton wrote:
> Jaroslav Kysela wrote:
>> On Fri, 13 Jun 2008, Takashi Iwai wrote:
>>
>>
>>> - Add some new API functions,
>>>
>> I would prefer to extend the current API than to change meaning of hw_ptr
>> to handle extra latencies.
>>
>>
> I would prefer the definition of snd_pcm_delay() to be:
> Before the next sample is written to the buffer, snd_pcm_delay() returns
> the expect time delay, in frames, indicating the time the next sample
> will reach the speakers.
> This is what snd_pcm_delay() was introduced into the ALSA api for. I
> remember, because it was added as a result of me requesting it.
>
>
> Then implement a totally different api call to help with under run timings.
Big +1
You also have to think of the use cases currently out there.
* World + Dog uses it as James (and Lennart) states.
* Wine uses it sans latency.
So lots of apps having to change to cope verses one (known) app
changing. I think even the wine folk would agree this is more sensible!
Also by changing the definition, would you not have to change the
usb-audio driver works? In general I'd say it's a whole lot less work to
leave snd_pcm_delay() as it is, update the docs and add a new api
function for under run stuff.
Col
More information about the Alsa-devel
mailing list