diff --git a/osu.Game/Overlays/MusicController.cs b/osu.Game/Overlays/MusicController.cs index 948cbe31f1..1189d9a55f 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.Scaled.GetBoundCopy(); + sampleVolume = audio.VolumeSample.Decibel.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 4ff02606e1..b62c357c40 100644 --- a/osu.Game/Overlays/Settings/Sections/Audio/VolumeSettings.cs +++ b/osu.Game/Overlays/Settings/Sections/Audio/VolumeSettings.cs @@ -20,7 +20,7 @@ namespace osu.Game.Overlays.Settings.Sections.Audio [BackgroundDependencyLoader] private void load(AudioManager audio, OsuConfigManager config) { - config.BindWith(OsuSetting.VolumeInactive, volumeInactive.Real); + config.BindWith(OsuSetting.VolumeInactive, volumeInactive.Linear); volumeInactive.Scale(); Children = new Drawable[] @@ -28,27 +28,27 @@ namespace osu.Game.Overlays.Settings.Sections.Audio new VolumeAdjustSlider { LabelText = AudioSettingsStrings.MasterVolume, - Current = audio.Volume.Scaled, + Current = audio.Volume.Decibel, KeyboardStep = (float)BindableVolume.STEP, }, new VolumeAdjustSlider { LabelText = AudioSettingsStrings.MasterVolumeInactive, - Current = volumeInactive.Scaled, + Current = volumeInactive.Decibel, KeyboardStep = (float)BindableVolume.STEP, PlaySamplesOnAdjust = true, }, new VolumeAdjustSlider { LabelText = AudioSettingsStrings.EffectVolume, - Current = audio.VolumeSample.Scaled, + Current = audio.VolumeSample.Decibel, KeyboardStep = (float)BindableVolume.STEP, }, new VolumeAdjustSlider { LabelText = AudioSettingsStrings.MusicVolume, - Current = audio.VolumeTrack.Scaled, + Current = audio.VolumeTrack.Decibel, KeyboardStep = (float)BindableVolume.STEP, }, }; diff --git a/osu.Game/Overlays/Toolbar/ToolbarMusicButton.cs b/osu.Game/Overlays/Toolbar/ToolbarMusicButton.cs index c28031194a..4ae8821cf1 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.Scaled.GetBoundCopy(); + globalVolume = audio.Volume.Decibel.GetBoundCopy(); globalVolume.BindValueChanged(v => volumeBar.ResizeHeightTo((float)(1 - (v.NewValue / BindableVolume.MIN)), 200, Easing.OutQuint), true); } diff --git a/osu.Game/Overlays/VolumeOverlay.cs b/osu.Game/Overlays/VolumeOverlay.cs index b22cb69d39..64a9c2eda6 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.Scaled); - volumeMeterEffect.Bindable.BindTo(audio.VolumeSample.Scaled); - volumeMeterMusic.Bindable.BindTo(audio.VolumeTrack.Scaled); + volumeMeterMaster.Bindable.BindTo(audio.Volume.Decibel); + volumeMeterEffect.Bindable.BindTo(audio.VolumeSample.Decibel); + volumeMeterMusic.Bindable.BindTo(audio.VolumeTrack.Decibel); } protected override void LoadComplete() diff --git a/osu.Game/Screens/Play/PlayerLoader.cs b/osu.Game/Screens/Play/PlayerLoader.cs index 5a61b20164..3b48cc8473 100644 --- a/osu.Game/Screens/Play/PlayerLoader.cs +++ b/osu.Game/Screens/Play/PlayerLoader.cs @@ -650,7 +650,7 @@ namespace osu.Game.Screens.Play { if (!muteWarningShownOnce.Value) { - double aggregateVolumeTrack = audioManager.Volume.Real.Value * audioManager.VolumeTrack.Real.Value; + double aggregateVolumeTrack = audioManager.Volume.Linear.Value * audioManager.VolumeTrack.Linear.Value; // Checks if the notification has not been shown yet and also if master volume is muted, track/music volume is muted or if the whole game is muted. if (volumeOverlay?.IsMuted.Value == true || Precision.AlmostBigger(volume_requirement, aggregateVolumeTrack)) @@ -684,8 +684,8 @@ namespace osu.Game.Screens.Play // Check values before resetting, as the user may have only had mute enabled, in which case we might not need to adjust volumes. // Note that we only restore halfway to ensure the user isn't suddenly overloaded by unexpectedly high volume. - audioManager.Volume.SetFromLinear(Math.Max(audioManager.Volume.Real.Value, 0.5)); - audioManager.VolumeTrack.SetFromLinear(Math.Max(audioManager.VolumeTrack.Real.Value, 0.5)); + audioManager.Volume.SetFromLinear(Math.Max(audioManager.Volume.Linear.Value, 0.5)); + audioManager.VolumeTrack.SetFromLinear(Math.Max(audioManager.VolumeTrack.Linear.Value, 0.5)); return true; };