From f34023f3e824353d24f06b6859d59bfcdc4204d3 Mon Sep 17 00:00:00 2001 From: sonicfind Date: Sun, 28 Jul 2024 22:45:31 -0500 Subject: [PATCH] Remove 70% stem volume scaler (#198) --- YARG.Core/Audio/AudioHelpers.cs | 1 - YARG.Core/Audio/GlobalAudioHandler.cs | 18 +++++++++--------- YARG.Core/Audio/StemSettings.cs | 6 ++---- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/YARG.Core/Audio/AudioHelpers.cs b/YARG.Core/Audio/AudioHelpers.cs index f7bce7e64..b68d4747a 100644 --- a/YARG.Core/Audio/AudioHelpers.cs +++ b/YARG.Core/Audio/AudioHelpers.cs @@ -5,7 +5,6 @@ namespace YARG.Core.Audio { public static class AudioHelpers { - public const double SONG_VOLUME_MULTIPLIER = 0.7; public static readonly Dictionary SupportedStems = new() { { "song", SongStem.Song }, diff --git a/YARG.Core/Audio/GlobalAudioHandler.cs b/YARG.Core/Audio/GlobalAudioHandler.cs index cd4945d3b..377fe7d08 100644 --- a/YARG.Core/Audio/GlobalAudioHandler.cs +++ b/YARG.Core/Audio/GlobalAudioHandler.cs @@ -26,16 +26,16 @@ public static class GlobalAudioHandler static GlobalAudioHandler() { - var vocals = new StemSettings(AudioHelpers.SONG_VOLUME_MULTIPLIER); - var drums = new StemSettings(AudioHelpers.SONG_VOLUME_MULTIPLIER); + var vocals = new StemSettings(); + var drums = new StemSettings(); StemSettings = new() { - { SongStem.Song, new StemSettings(AudioHelpers.SONG_VOLUME_MULTIPLIER) }, - { SongStem.Guitar, new StemSettings(AudioHelpers.SONG_VOLUME_MULTIPLIER) }, - { SongStem.Bass, new StemSettings(AudioHelpers.SONG_VOLUME_MULTIPLIER) }, - { SongStem.Rhythm, new StemSettings(AudioHelpers.SONG_VOLUME_MULTIPLIER) }, - { SongStem.Keys, new StemSettings(AudioHelpers.SONG_VOLUME_MULTIPLIER) }, + { SongStem.Song, new StemSettings() }, + { SongStem.Guitar, new StemSettings() }, + { SongStem.Bass, new StemSettings() }, + { SongStem.Rhythm, new StemSettings() }, + { SongStem.Keys, new StemSettings() }, { SongStem.Vocals, vocals }, { SongStem.Vocals1, vocals }, { SongStem.Vocals2, vocals }, @@ -44,8 +44,8 @@ static GlobalAudioHandler() { SongStem.Drums2, drums }, { SongStem.Drums3, drums }, { SongStem.Drums4, drums }, - { SongStem.Crowd, new StemSettings(AudioHelpers.SONG_VOLUME_MULTIPLIER) }, - { SongStem.Sfx, new StemSettings(1) }, + { SongStem.Crowd, new StemSettings() }, + { SongStem.Sfx, new StemSettings() }, }; } diff --git a/YARG.Core/Audio/StemSettings.cs b/YARG.Core/Audio/StemSettings.cs index 9f501c73b..c8c9c7d67 100644 --- a/YARG.Core/Audio/StemSettings.cs +++ b/YARG.Core/Audio/StemSettings.cs @@ -5,16 +5,14 @@ namespace YARG.Core.Audio public class StemSettings { public static bool ApplySettings = true; - private readonly double _volumeScaling; private Action? _onVolumeChange; private Action? _onReverbChange; private double _volume; private bool _reverb; - public StemSettings(double scaling) + public StemSettings() { - _volumeScaling = scaling; _volume = 1; } @@ -40,7 +38,7 @@ public double VolumeSetting } } - public double TrueVolume => (ApplySettings ? _volume : 1) * _volumeScaling; + public double TrueVolume => (ApplySettings ? _volume : 1); public bool Reverb {