diff --git a/osu.Game/Screens/Play/PlayerLoader.cs b/osu.Game/Screens/Play/PlayerLoader.cs index d852ac2940..4e5ccde579 100644 --- a/osu.Game/Screens/Play/PlayerLoader.cs +++ b/osu.Game/Screens/Play/PlayerLoader.cs @@ -5,6 +5,7 @@ using System; using System.Diagnostics; using System.Threading.Tasks; using JetBrains.Annotations; +using ManagedBass.Fx; using osu.Framework.Allocation; using osu.Framework.Audio; using osu.Framework.Bindables; @@ -67,6 +68,7 @@ namespace osu.Game.Screens.Play private readonly BindableDouble volumeAdjustment = new BindableDouble(1); private AudioFilter lowPassFilter; + private AudioFilter highPassFilter; protected bool BackgroundBrightnessReduction { @@ -168,7 +170,8 @@ namespace osu.Game.Screens.Play }, idleTracker = new IdleTracker(750), }), - lowPassFilter = new AudioFilter(audio.TrackMixer) + lowPassFilter = new AudioFilter(audio.TrackMixer), + highPassFilter = new AudioFilter(audio.TrackMixer, BQFType.HighPass) }; if (Beatmap.Value.BeatmapInfo.EpilepsyWarning) @@ -239,6 +242,7 @@ namespace osu.Game.Screens.Play Beatmap.Value.Track.Stop(); Beatmap.Value.Track.RemoveAdjustment(AdjustableProperty.Volume, volumeAdjustment); lowPassFilter.CutoffTo(AudioFilter.MAX_LOWPASS_CUTOFF); + highPassFilter.CutoffTo(0); } public override bool OnExiting(IScreen next) @@ -352,6 +356,7 @@ namespace osu.Game.Screens.Play content.FadeInFromZero(400); content.ScaleTo(1, 650, Easing.OutQuint).Then().Schedule(prepareNewPlayer); lowPassFilter.CutoffTo(1000, 650, Easing.OutQuint); + highPassFilter.CutoffTo(300); ApplyToBackground(b => b?.FadeColour(Color4.White, 800, Easing.OutQuint)); } @@ -364,6 +369,7 @@ namespace osu.Game.Screens.Play content.ScaleTo(0.7f, content_out_duration * 2, Easing.OutQuint); content.FadeOut(content_out_duration, Easing.OutQuint); lowPassFilter.CutoffTo(AudioFilter.MAX_LOWPASS_CUTOFF, content_out_duration); + highPassFilter.CutoffTo(0, content_out_duration); } private void pushWhenLoaded()