[vlc-devel] Fixing long latency audio outputs like Airplay

David Fuhrmann david.fuhrmann at gmail.com
Sat Jun 27 11:35:17 CEST 2015


> Am 27.06.2015 um 10:53 schrieb Rémi Denis-Courmont <remi at remlab.net>:
> 
> Le 2015-06-27 11:12, David Fuhrmann a écrit :
>> Thanks for the input, Remi. I understand that it likely takes more
>> effort to properly support it. What do you exactly mean with latency
>> requirements? From my understanding, the current latency is already
>> reported by time_get. Do you mean reporting an expected latency value
>> beforehand, to adapt buffer sizes or whatever beforehand?
> 
> TimeGet timings are (currently) not propagated upstream of the audio output. You _can_ report 2 seconds latency, but instead of increasing caching, it will trash late audio frames.
> 
>> Where is this 40 ms value hardcoded / incorporated?
> 
> AOUT_MIN_PREPARE_TIME and probably a whole lot of other magic values.
> 
>> Additionally, I’m asking what the difference is between the current
>> audio sync option and the aout latency. Maybe the former can be used
>> to mitigate the problem?
> 
> I don't know.
> 
>> Before VLC 2.2, the user needed to set the
>> -2000ms shift by hand, and this seems to work fine even for higher
>> shifts.
> 
> I don't know what you mean.

I’m talking about the „audio-delay“ variable, were values like -2 secs or even higher usually work fine AFAIK. Before we added the airplay latency of 2 seconds in audio output (in 2.2), users used this setting to set the delay to -2 seconds once they knew or figured out this value being correct for their airplay device.

One really hackish workaround would be to remove the latency again from aout, and set this value automatically in UI, once an airplay device is detected. But this sounds completely ugly to me…

Best regards,
David


More information about the vlc-devel mailing list