Add more measurements to the granular mixer queue

This commit is contained in:
Henrik Rydgård committed 2025-08-22 21:21:20 +02:00
1 parent 8a76ac74fc
commit 07ad5ff372
3 files changed
+67 -26

No files matched your search

+7 -2
View File
@@ -1352,10 +1352,15 @@ void DrawAudioOut(ImConfig &cfg, ImControl &control) {
GranularStats stats;
g_granular.GetStats(&stats);
ImGui::Text("Granules");
ImGui::Text("Queued: %d", stats.queuedGranules);
ImGui::Text("Read size: %0.2f", stats.smoothedReadSize);
ImGui::Text("Queued min/max: %d / %d", stats.queuedGranulesMin, stats.queuedGranulesMax);
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", stats.queuedGranules * GranularMixer::GRANULE_SIZE * 1000 / 44100);
ImGui::Text("Computed queue latency: %d ms", (int)(stats.smoothedQueuedGranules * (GranularMixer::GRANULE_SIZE * 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);
}
ImGui::End();