[vlc-devel] [PATCH] OSS audio: Use SNDCTL_DSP_GETODELAY rather than GETOSPACE.

Rémi Denis-Courmont remi at remlab.net
Fri Jul 29 15:58:26 CEST 2011


On Wed, 27 Jul 2011 21:53:18 +0200, Hans-Kristian Arntzen
<maister at archlinux.us> wrote:
> On 07/27/2011 09:13 PM, Rémi Denis-Courmont wrote:
>> Le mercredi 27 juillet 2011 21:53:21 Hans-Kristian Arntzen, vous avez
>> écrit :
>>> Found an issue with the OSS driver, hopefully changes are accepted to
it
>>> since it seemed to be really old.
>> Errm, does GETODELAY really return a byte count?
>> This would be rather counter-intuitive...
>>
>> On the cosmetic side, this would avoid duplicating the ifdef:
>>
>> +#ifdef SNDCTL_DSP_GETODELAY
>> +    if ( ioctl( p_sys->i_fd, SNDCTL_DSP_GETODELAY,&i_bytes )<  0 )
>> +#endif
>>       {
>>
> Yes, GETODELAY returns latency in bytes. From OSSv4 documentation: 
> http://manuals.opensound.com/developer/SNDCTL_DSP_GETODELAY.html

Weird choice but OK. This patch looks fine to me then.

GETODELAY will typically return larger values than GETOSPACE, right? In
that case, there is a risk that VLC will be continuously late and
accumulate under-runs. This is known to happen with some ALSA drivers, but
I believe the issue lies in VLC, not in ALSA. So you might want to check if
it would make sense to tweak some timing constant in the OSS plugin...

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list