From 72bfe1c8467a2239c7fc081b8c9d46c2b862fccb Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Thu, 6 Mar 2025 13:14:27 -0800 Subject: [PATCH] Bug Fix: Latency reporting for high latency output Fixes visualization latency under virtual machines, at least. Not sure which local or native systems would be reporting high latency here, but this should fix them as well. Signed-off-by: Christopher Snowhill --- Audio/Output/OutputCoreAudio.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Audio/Output/OutputCoreAudio.m b/Audio/Output/OutputCoreAudio.m index 78f3d3486..ee5ae346a 100644 --- a/Audio/Output/OutputCoreAudio.m +++ b/Audio/Output/OutputCoreAudio.m @@ -706,7 +706,11 @@ current_device_listener(AudioObjectID inObjectID, UInt32 inNumberAddresses, cons } - (double)latency { - return [outputBuffer listDuration]; + NSTimeInterval latency = 0.0; + if(_au) { + latency = [_au latency]; + } + return [outputBuffer listDuration] + latency; } - (void)start {