[vlc-commits] coreaudio: use the dev latency for the deferred calculation
Thomas Guillem
git at videolan.org
Tue Oct 22 14:05:32 CEST 2019
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Oct 22 14:02:58 2019 +0200| [3d02229ab60feef625ffd7dd5beb9fc0d59be8ea] | committer: Thomas Guillem
coreaudio: use the dev latency for the deferred calculation
Tested on iOS (where this variable can be different than 0).
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3d02229ab60feef625ffd7dd5beb9fc0d59be8ea
---
modules/audio_output/coreaudio_common.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/audio_output/coreaudio_common.c b/modules/audio_output/coreaudio_common.c
index 921c88eb28..419c27f16a 100644
--- a/modules/audio_output/coreaudio_common.c
+++ b/modules/audio_output/coreaudio_common.c
@@ -248,7 +248,8 @@ ca_GetLatencyLocked(audio_output_t *p_aout)
struct aout_sys_common *p_sys = (struct aout_sys_common *) p_aout->sys;
const int64_t i_out_frames = BytesToFrames(p_sys, p_sys->i_out_size);
- return FramesToUs(p_sys, i_out_frames + p_sys->i_render_frames);
+ return FramesToUs(p_sys, i_out_frames + p_sys->i_render_frames)
+ + p_sys->i_dev_latency_us;
}
int
@@ -268,8 +269,7 @@ ca_TimeGet(audio_output_t *p_aout, vlc_tick_t *delay)
const vlc_tick_t i_render_time_us = HostTimeToTick(p_sys->i_render_host_time);
const vlc_tick_t i_render_delay = i_render_time_us - vlc_tick_now();
- *delay = ca_GetLatencyLocked(p_aout) + i_render_delay
- + p_sys->i_dev_latency_us;
+ *delay = ca_GetLatencyLocked(p_aout) + i_render_delay;
lock_unlock(p_sys);
return 0;
}
More information about the vlc-commits
mailing list