Commit 6f54a759 authored by David Fuhrmann's avatar David Fuhrmann

auhal: do not add long latency to time_get callback

Currently, the VLC code cannot cope with big audio device
latencies as reported by airplay devices. Thus disable the
latency calculation for those devices for now.

refs #14042
parent 1cb319a1
......@@ -441,8 +441,14 @@ static int Start(audio_output_t *p_aout, audio_sample_format_t *restrict fmt)
msg_Warn(p_aout, "Cannot get device latency [%4.4s]",
(char *)&err);
}
msg_Dbg(p_aout, "Current device has a latency of %u frames", p_sys->i_device_latency);
float f_latency_in_sec = (float)p_sys->i_device_latency / (float)fmt->i_rate;
msg_Dbg(p_aout, "Current device has a latency of %u frames (%f sec)", p_sys->i_device_latency, f_latency_in_sec);
// Ignore long Airplay latency as this is not correctly working yet
if (f_latency_in_sec > 0.5f) {
msg_Info(p_aout, "Ignore high latency as it causes problems currently.");
p_sys->i_device_latency = 0;
}
bool b_success = false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment