From a388f49441b3cf646f74ebe7d879551ed06eac84 Mon Sep 17 00:00:00 2001 From: Tully <166401925+Tully-B@users.noreply.github.com> Date: Tue, 9 Apr 2024 00:14:10 +0200 Subject: [PATCH 1/2] Fix sound slider making its sound at the previous volume level when clicked on --- Source/gmenu.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Source/gmenu.cpp b/Source/gmenu.cpp index 477242186..3a8a4baba 100644 --- a/Source/gmenu.cpp +++ b/Source/gmenu.cpp @@ -351,7 +351,13 @@ bool gmenu_left_mouse(bool isDown) return true; } sgpCurrItem = pItem; - PlaySFX(SfxID::MenuMove); + + // Do not play a duplicate sound if we are clicking on the sound slider. + // CurrentMenuId == 5 is the options menu, i == 1 is the sound slider. + if ((sgCurrentMenuIdx != 5) || (i != 1)) { + PlaySFX(SfxID::MenuMove); + } + if (pItem->isSlider()) { isDraggingSlider = GmenuMouseIsOverSlider(); gmenu_on_mouse_move(); From f6d15d2a8f1d2aaa74833e7fe1a138550b5c61a7 Mon Sep 17 00:00:00 2001 From: Tully <166401925+Tully-B@users.noreply.github.com> Date: Wed, 10 Apr 2024 09:28:26 +0200 Subject: [PATCH 2/2] Increase minimum volume level from -100dB to -60dB --- Source/utils/soundsample.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/utils/soundsample.cpp b/Source/utils/soundsample.cpp index ac34d5369..ac382ee4b 100644 --- a/Source/utils/soundsample.cpp +++ b/Source/utils/soundsample.cpp @@ -36,9 +36,9 @@ constexpr float VolumeScale = 3321.9281F; /** * Min and max volume range, in millibel. - * -100 dB (muted) to 0 dB (max. loudness). + * -60 dB (muted) to 0 dB (max. loudness). */ -constexpr float MillibelMin = -10000.F; +constexpr float MillibelMin = -6000.F; constexpr float MillibelMax = 0.F; /**