From 2f7d45db09ba90fa6554b29ce5b39c9e72d15499 Mon Sep 17 00:00:00 2001 From: refractionpcsx2 Date: Tue, 4 Oct 2022 21:25:09 +0100 Subject: [PATCH] SPU: Allow up to 200% final volume --- pcsx2-qt/Settings/AudioSettingsWidget.ui | 4 ++-- pcsx2/Frontend/FullscreenUI.cpp | 2 +- pcsx2/SPU2/Host/Config.cpp | 4 ++-- pcsx2/SPU2/Linux/Config.cpp | 4 ++-- pcsx2/SPU2/Windows/Config.cpp | 6 +++--- pcsx2/SPU2/wx/wxConfig.cpp | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/pcsx2-qt/Settings/AudioSettingsWidget.ui b/pcsx2-qt/Settings/AudioSettingsWidget.ui index 3d2ab5cc64..67dfc5a5c4 100644 --- a/pcsx2-qt/Settings/AudioSettingsWidget.ui +++ b/pcsx2-qt/Settings/AudioSettingsWidget.ui @@ -7,7 +7,7 @@ 0 0 752 - 430 + 448 @@ -402,7 +402,7 @@ - 100 + 200 Qt::Vertical diff --git a/pcsx2/Frontend/FullscreenUI.cpp b/pcsx2/Frontend/FullscreenUI.cpp index cc7a799afd..e11efcef69 100644 --- a/pcsx2/Frontend/FullscreenUI.cpp +++ b/pcsx2/Frontend/FullscreenUI.cpp @@ -2843,7 +2843,7 @@ void FullscreenUI::DrawAudioSettingsPage() MenuHeading("Runtime Settings"); DrawIntRangeSetting(bsi, ICON_FA_VOLUME_UP " Output Volume", "Applies a global volume modifier to all sound produced by the game.", - "SPU2/Mixing", "FinalVolume", 100, 0, 100, "%d%%"); + "SPU2/Mixing", "FinalVolume", 100, 0, 200, "%d%%"); MenuHeading("Mixing Settings"); DrawIntListSetting(bsi, ICON_FA_MUSIC " Interpolation Mode", "Determines how ADPCM samples are interpolated to the target pitch.", diff --git a/pcsx2/SPU2/Host/Config.cpp b/pcsx2/SPU2/Host/Config.cpp index 3aab3ecd62..96b639b79d 100644 --- a/pcsx2/SPU2/Host/Config.cpp +++ b/pcsx2/SPU2/Host/Config.cpp @@ -75,8 +75,8 @@ void ReadSettings() { Interpolation = Host::GetIntSettingValue("SPU2/Mixing", "Interpolation", 5); FinalVolume = ((float)Host::GetIntSettingValue("SPU2/Mixing", "FinalVolume", 100)) / 100; - if (FinalVolume > 1.0f) - FinalVolume = 1.0f; + if (FinalVolume > 2.0f) + FinalVolume = 2.0f; AdvancedVolumeControl = Host::GetBoolSettingValue("SPU2/Mixing", "AdvancedVolumeControl", false); VolumeAdjustCdb = Host::GetFloatSettingValue("SPU2/Mixing", "VolumeAdjustC", 0); diff --git a/pcsx2/SPU2/Linux/Config.cpp b/pcsx2/SPU2/Linux/Config.cpp index 545679f752..afd32ec5f2 100644 --- a/pcsx2/SPU2/Linux/Config.cpp +++ b/pcsx2/SPU2/Linux/Config.cpp @@ -81,8 +81,8 @@ void ReadSettings() Interpolation = CfgReadInt(L"MIXING", L"Interpolation", 5); FinalVolume = ((float)CfgReadInt(L"MIXING", L"FinalVolume", 100)) / 100; - if (FinalVolume > 1.0f) - FinalVolume = 1.0f; + if (FinalVolume > 2.0f) + FinalVolume = 2.0f; AdvancedVolumeControl = CfgReadBool(L"MIXING", L"AdvancedVolumeControl", false); VolumeAdjustCdb = CfgReadFloat(L"MIXING", L"VolumeAdjustC(dB)", 0); diff --git a/pcsx2/SPU2/Windows/Config.cpp b/pcsx2/SPU2/Windows/Config.cpp index 286a544c71..209a9581b9 100644 --- a/pcsx2/SPU2/Windows/Config.cpp +++ b/pcsx2/SPU2/Windows/Config.cpp @@ -81,8 +81,8 @@ void ReadSettings() Interpolation = CfgReadInt(L"MIXING", L"Interpolation", 5); FinalVolume = ((float)CfgReadInt(L"MIXING", L"FinalVolume", 100)) / 100; - if (FinalVolume > 1.0f) - FinalVolume = 1.0f; + if (FinalVolume > 2.0f) + FinalVolume = 2.0f; AdvancedVolumeControl = CfgReadBool(L"MIXING", L"AdvancedVolumeControl", false); VolumeAdjustCdb = CfgReadFloat(L"MIXING", L"VolumeAdjustC(dB)", 0); @@ -359,7 +359,7 @@ BOOL CALLBACK ConfigProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) SetWindowText(GetDlgItem(hWnd, IDC_LATENCY_LABEL), temp); int configvol = (int)(FinalVolume * 100); - INIT_SLIDER(IDC_VOLUME_SLIDER, 0, 100, 10, 5, 1); + INIT_SLIDER(IDC_VOLUME_SLIDER, 0, 200, 10, 5, 1); SendDialogMsg(hWnd, IDC_VOLUME_SLIDER, TBM_SETPOS, TRUE, configvol); swprintf_s(temp, L"%d%%", configvol); diff --git a/pcsx2/SPU2/wx/wxConfig.cpp b/pcsx2/SPU2/wx/wxConfig.cpp index 6b956ba6d4..9465ec7ca6 100644 --- a/pcsx2/SPU2/wx/wxConfig.cpp +++ b/pcsx2/SPU2/wx/wxConfig.cpp @@ -60,7 +60,7 @@ MixerTab::MixerTab(wxWindow* parent) // Volume Slider m_volume_box = new wxStaticBoxSizer(wxVERTICAL, this, "Volume"); - m_volume_slider = new wxSlider(this, wxID_ANY, FinalVolume * 100, 0, 100, wxDefaultPosition, wxDefaultSize, wxSL_LABELS); + m_volume_slider = new wxSlider(this, wxID_ANY, FinalVolume * 100, 0, 200, wxDefaultPosition, wxDefaultSize, wxSL_LABELS); m_volume_box->Add(m_volume_slider, wxSizerFlags().Expand()); m_audio_box = new wxBoxSizer(wxVERTICAL);