From 242eeb5651f44dfc890fe34f258fb889e01e3a4a Mon Sep 17 00:00:00 2001 From: Thomas Guillem Date: Fri, 16 Dec 2022 11:12:25 +0100 Subject: [PATCH] audiounit_ios: don't include IOBufferDuration in latency But continue to log it. --- modules/audio_output/audiounit_ios.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/audio_output/audiounit_ios.m b/modules/audio_output/audiounit_ios.m index 591ea75b7b34..f41336112fd3 100644 --- a/modules/audio_output/audiounit_ios.m +++ b/modules/audio_output/audiounit_ios.m @@ -183,7 +183,8 @@ - (NSInteger)removeAoutInstance:(AoutWrapper *)wrapperInstance p_sys->io_buffer_duration_ticks = us; changed = true; } - latency_us += us; + /* Don't add 'us' to 'latency_us', IOBufferDuration is already handled by + * the render callback (end_ticks include the current buffer length). */ if (changed) msg_Dbg(p_aout, "Current device has a new total latency of %" PRId64 "us",