From 997cc9207215ea79a9905775ee2c42ec9f552799 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Mon, 9 Nov 2026 21:00:38 +0100 Subject: [PATCH] ImDebugger: Count a queued granule as half a granule of latency The granules overlap by half, so each one in the queue adds 128 samples, not 256. Co-Authored-By: Claude Opus 5.5 --- UI/ImDebugger/ImDebugger.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UI/ImDebugger/ImDebugger.cpp b/UI/ImDebugger/ImDebugger.cpp index ec3e60b063..24b83a0db1 100644 --- a/UI/ImDebugger/ImDebugger.cpp +++ b/UI/ImDebugger/ImDebugger.cpp @@ -1717,7 +1717,7 @@ void DrawAudioOut(ImConfig &cfg, ImControl &control) { ImGui::Text("Queued (smooth): %0.3f", stats.smoothedQueuedGranules); ImGui::Text("Target: %d", stats.targetQueueSize); ImGui::Text("Max: %d", stats.maxQueuedGranules); - ImGui::Text("Computed queue latency: %d ms", (int)(stats.smoothedQueuedGranules * (GranularMixer::GRANULE_SIZE * 1000.0 / 44100.0))); + ImGui::Text("Computed queue latency: %d ms", (int)(stats.smoothedQueuedGranules * (GranularMixer::GRANULE_SIZE / 2 * 1000.0 / 44100.0))); ImGui::Text("Fade volume: %0.2f", stats.fadeVolume); ImGui::Text("Looping: %s", BoolStr(stats.looping)); ImGui::Text("Under/Over: %d / %d", stats.underruns, stats.overruns);