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 <noreply@anthropic.com>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 committed 2026-11-10 10:29:23 +01:00
1 parent d20d388611
commit 997cc92072
1 file changed
+1 -1
+1 -1
View File
@@ -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);