Re: What does snd_pcm_delay() actually return?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Takashi Iwai wrote:
>> I think this 
>> was done due to the docs specifically say that it is the "difference 
>> between appl_ptr and hw_ptr" so it makes sense to assume this will 
>> return 0 when there is nothing waiting to be played. I would strongly 
>> recommend that you remove the implementation detail from the (supposedly 
>> high level) docs.
> 
> Why?  I don't see your logic...

Well in the pulseaudio driver, snd_pcm_delay() will typically *not* 
return 0 because it will include e.g. network latency.

Therefore the wine code which *expects* it to return 0 (e.g. waits for 
it to return 0) does not get the relevant trigger it needs.

The fact that the implementation detail is included in the docs means 
that the belief that this function *will* return 0 in all cases when no 
samples are left to be played is totally understandable. As you and 
James have confirmed, the snd_pcm_delay() function should return details 
about the delay expected. The fact that this is the "difference
 >> between appl_ptr and hw_ptr" does not seem to be correct in all 
cases/impelmentations.

I'm no alsa expert so forgive me if I'm just "not getting it". :p

Col

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux