From 3b683a8e43a23875b5762dce03bfbc42c66b699e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 17 Jun 2025 15:19:15 +0200 Subject: [PATCH] Add UI to pick resampler mode --- UI/GameSettingsScreen.cpp | 4 ++++ UI/ImDebugger/ImDebugger.cpp | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index 2f3ee6fa48..a36eb376a1 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -674,6 +674,10 @@ void GameSettingsScreen::CreateAudioSettings(UI::ViewGroup *audioSettings) { mixWithOthers->SetEnabledPtr(&g_Config.bEnableSound); #endif audioSettings->Add(new ItemHeader(a->T("Audio"))); + + static const char *syncModes[] = { "Smooth", "Classic" }; + + audioSettings->Add(new PopupMultiChoice(&g_Config.iAudioSyncMode, a->T("Audio sync mode"), syncModes, 0, ARRAY_SIZE(syncModes), I18NCat::AUDIO, screenManager())); audioSettings->Add(new CheckBox(&g_Config.bFillAudioGaps, a->T("Fill audio gaps"))); audioSettings->Add(new ItemHeader(a->T("Game volume"))); diff --git a/UI/ImDebugger/ImDebugger.cpp b/UI/ImDebugger/ImDebugger.cpp index 0b95cb9d54..3f9e57c0f3 100644 --- a/UI/ImDebugger/ImDebugger.cpp +++ b/UI/ImDebugger/ImDebugger.cpp @@ -1361,6 +1361,11 @@ void DrawAudioOut(ImConfig &cfg, ImControl &control) { 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); + } else { + ImGui::Text("StereoResampler classic"); + char buf[1024]; + g_resampler.GetAudioDebugStats(buf, sizeof(buf)); + ImGui::Text("%s", buf); } ImGui::End();