diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index 9927467bd6..c3b733ae58 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -16,6 +16,7 @@ using osu.Framework.Input.Events; using osu.Framework.Logging; using osu.Framework.Screens; using osu.Framework.Threading; +using osu.Game.Audio.Effects; using osu.Game.Beatmaps; using osu.Game.Configuration; using osu.Game.Graphics.Containers; @@ -62,6 +63,8 @@ namespace osu.Game.Screens.Play private readonly Bindable samplePlaybackDisabled = new Bindable(); + private Filter lpFilter; + /// /// Whether gameplay should pause when the game window focus is lost. /// @@ -227,6 +230,7 @@ namespace osu.Game.Screens.Play AddInternal(GameplayBeatmap = new GameplayBeatmap(playableBeatmap)); AddInternal(screenSuspension = new ScreenSuspensionHandler(GameplayClockContainer)); + AddInternal(lpFilter = new Filter(audio.TrackMixer)); dependencies.CacheAs(GameplayBeatmap); @@ -788,6 +792,7 @@ namespace osu.Game.Screens.Play if (PauseOverlay.State.Value == Visibility.Visible) PauseOverlay.Hide(); + lpFilter.CutoffTo(300, 2500, Easing.OutCubic); failAnimation.Start(); if (Mods.Value.OfType().Any(m => m.RestartOnFail)) @@ -800,6 +805,7 @@ namespace osu.Game.Screens.Play private void onFailComplete() { GameplayClockContainer.Stop(); + lpFilter.CutoffTo(lpFilter.MaxCutoff); FailOverlay.Retries = RestartCount; FailOverlay.Show();