diff --git a/osu.Game/Configuration/OsuConfigManager.cs b/osu.Game/Configuration/OsuConfigManager.cs index 6f32e1e7fb..4a8a1b32f7 100644 --- a/osu.Game/Configuration/OsuConfigManager.cs +++ b/osu.Game/Configuration/OsuConfigManager.cs @@ -98,7 +98,7 @@ namespace osu.Game.Configuration SetDefault(OsuSetting.NotifyOnPrivateMessage, true); // Audio - SetDefault(OsuSetting.VolumeInactive, 0.25, 0, 1, 0.01); + SetDefault(OsuSetting.VolumeInactive, 0.25, 0, 1); SetDefault(OsuSetting.MenuVoice, true); SetDefault(OsuSetting.MenuMusic, true); diff --git a/osu.Game/Overlays/MusicController.cs b/osu.Game/Overlays/MusicController.cs index 87920fdf55..948cbe31f1 100644 --- a/osu.Game/Overlays/MusicController.cs +++ b/osu.Game/Overlays/MusicController.cs @@ -81,7 +81,7 @@ namespace osu.Game.Overlays { AddInternal(audioDuckFilter = new AudioFilter(audio.TrackMixer)); audio.Tracks.AddAdjustment(AdjustableProperty.Volume, audioDuckVolume); - sampleVolume = audio.VolumeSample.GetBoundCopy(); + sampleVolume = audio.VolumeSample.Scaled.GetBoundCopy(); configManager.BindWith(OsuSetting.RandomSelectAlgorithm, randomSelectAlgorithm); } diff --git a/osu.Game/Overlays/Settings/Sections/Audio/VolumeSettings.cs b/osu.Game/Overlays/Settings/Sections/Audio/VolumeSettings.cs index 2bb5fa983f..a813c8a147 100644 --- a/osu.Game/Overlays/Settings/Sections/Audio/VolumeSettings.cs +++ b/osu.Game/Overlays/Settings/Sections/Audio/VolumeSettings.cs @@ -15,29 +15,34 @@ namespace osu.Game.Overlays.Settings.Sections.Audio { protected override LocalisableString Header => AudioSettingsStrings.VolumeHeader; + private readonly VolumeScaler volumeInactive = new VolumeScaler(); + [BackgroundDependencyLoader] private void load(AudioManager audio, OsuConfigManager config) { + config.BindWith(OsuSetting.VolumeInactive, volumeInactive.Real); + volumeInactive.Scale(); + Children = new Drawable[] { new VolumeAdjustSlider { LabelText = AudioSettingsStrings.MasterVolume, - Current = audio.Volume, + Current = audio.Volume.Scaled, KeyboardStep = 0.01f, DisplayAsPercentage = true }, new SettingsSlider { LabelText = AudioSettingsStrings.MasterVolumeInactive, - Current = config.GetBindable(OsuSetting.VolumeInactive), + Current = volumeInactive.Scaled, KeyboardStep = 0.01f, DisplayAsPercentage = true }, new VolumeAdjustSlider { LabelText = AudioSettingsStrings.EffectVolume, - Current = audio.VolumeSample, + Current = audio.VolumeSample.Scaled, KeyboardStep = 0.01f, DisplayAsPercentage = true }, @@ -45,7 +50,7 @@ namespace osu.Game.Overlays.Settings.Sections.Audio new VolumeAdjustSlider { LabelText = AudioSettingsStrings.MusicVolume, - Current = audio.VolumeTrack, + Current = audio.VolumeTrack.Scaled, KeyboardStep = 0.01f, DisplayAsPercentage = true }, diff --git a/osu.Game/Overlays/Toolbar/ToolbarMusicButton.cs b/osu.Game/Overlays/Toolbar/ToolbarMusicButton.cs index 51b95b7d32..a962063391 100644 --- a/osu.Game/Overlays/Toolbar/ToolbarMusicButton.cs +++ b/osu.Game/Overlays/Toolbar/ToolbarMusicButton.cs @@ -77,7 +77,7 @@ namespace osu.Game.Overlays.Toolbar { base.LoadComplete(); - globalVolume = audio.Volume.GetBoundCopy(); + globalVolume = audio.Volume.Scaled.GetBoundCopy(); globalVolume.BindValueChanged(v => volumeBar.ResizeHeightTo((float)v.NewValue, 200, Easing.OutQuint), true); } diff --git a/osu.Game/Overlays/VolumeOverlay.cs b/osu.Game/Overlays/VolumeOverlay.cs index bb2ad60695..b22cb69d39 100644 --- a/osu.Game/Overlays/VolumeOverlay.cs +++ b/osu.Game/Overlays/VolumeOverlay.cs @@ -76,9 +76,9 @@ namespace osu.Game.Overlays }, }); - volumeMeterMaster.Bindable.BindTo(audio.Volume); - volumeMeterEffect.Bindable.BindTo(audio.VolumeSample); - volumeMeterMusic.Bindable.BindTo(audio.VolumeTrack); + volumeMeterMaster.Bindable.BindTo(audio.Volume.Scaled); + volumeMeterEffect.Bindable.BindTo(audio.VolumeSample.Scaled); + volumeMeterMusic.Bindable.BindTo(audio.VolumeTrack.Scaled); } protected override void LoadComplete()