From 5b1b22cb6611fe3efcb156fea3ce2856882a1612 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Mon, 18 Aug 2025 08:54:45 +0200 Subject: [PATCH 1/3] Fix replay fail indicator "go to results" button being clickable while invisible closes https://github.com/ppy/osu/issues/34685 --- osu.Game/Screens/Play/ReplayFailIndicator.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/osu.Game/Screens/Play/ReplayFailIndicator.cs b/osu.Game/Screens/Play/ReplayFailIndicator.cs index ee9d97a075..f6c6902552 100644 --- a/osu.Game/Screens/Play/ReplayFailIndicator.cs +++ b/osu.Game/Screens/Play/ReplayFailIndicator.cs @@ -36,6 +36,7 @@ namespace osu.Game.Screens.Play private SkinnableSound failSample = null!; private AudioFilter failLowPassFilter = null!; private AudioFilter failHighPassFilter = null!; + private Container content = null!; private double? failTime; @@ -44,7 +45,6 @@ namespace osu.Game.Screens.Play public ReplayFailIndicator(GameplayClockContainer gameplayClockContainer) { - AlwaysPresent = true; Clock = this.gameplayClockContainer = gameplayClockContainer; } @@ -54,7 +54,6 @@ namespace osu.Game.Screens.Play Anchor = Anchor.Centre; Origin = Anchor.Centre; AutoSizeAxes = Axes.Both; - Alpha = 0; track = beatmap.Value.Track; @@ -65,13 +64,14 @@ namespace osu.Game.Screens.Play failSample = new SkinnableSound(new SampleInfo(@"Gameplay/failsound")), failLowPassFilter = new AudioFilter(audio.TrackMixer), failHighPassFilter = new AudioFilter(audio.TrackMixer, BQFType.HighPass), - new Container + content = new Container { Anchor = Anchor.Centre, Origin = Anchor.Centre, AutoSizeAxes = Axes.Both, Masking = true, CornerRadius = 20, + Alpha = 0, Children = new Drawable[] { new Box @@ -132,7 +132,7 @@ namespace osu.Game.Screens.Play // intentionally shorter than the actual fail animation const double audio_sweep_duration = 1000; - this.FadeInFromZero(200, Easing.OutQuint); + content.FadeInFromZero(200, Easing.OutQuint); this.ScaleTo(1.1f, audio_sweep_duration, Easing.OutElasticHalf); this.TransformBindableTo(trackFreq, 0, audio_sweep_duration); this.TransformBindableTo(volumeAdjustment, 0.5); From 59ec6ed2eb3a3c109fe80ca377d129d66832b353 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Mon, 18 Aug 2025 08:56:35 +0200 Subject: [PATCH 2/3] Stop fail sample when rewinding to before it in replay closes https://github.com/ppy/osu/issues/34688 I originally wrote it this way semi-intentionally because I thought cutting out the sample was worse than letting it play out, but I also forgot that people use like seventy hour long fail samples. --- osu.Game/Screens/Play/ReplayFailIndicator.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/osu.Game/Screens/Play/ReplayFailIndicator.cs b/osu.Game/Screens/Play/ReplayFailIndicator.cs index f6c6902552..769a84dce4 100644 --- a/osu.Game/Screens/Play/ReplayFailIndicator.cs +++ b/osu.Game/Screens/Play/ReplayFailIndicator.cs @@ -155,8 +155,11 @@ namespace osu.Game.Screens.Play failSample.Play(); } - if (Time.Current < failTime) + if (Time.Current < failTime && failSamplePlaybackInitiated) + { failSamplePlaybackInitiated = false; + failSample.Stop(); + } } protected override void Dispose(bool isDisposing) From d26f31b71d7fda2fc6e8b90431db3f61b67d8bc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Mon, 18 Aug 2025 09:09:34 +0200 Subject: [PATCH 3/3] Unapply replay playback speed when going to results closes https://github.com/ppy/osu/issues/34700 --- osu.Game/Screens/Play/ReplayPlayer.cs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/osu.Game/Screens/Play/ReplayPlayer.cs b/osu.Game/Screens/Play/ReplayPlayer.cs index 92eeb3c9fe..131ce452bc 100644 --- a/osu.Game/Screens/Play/ReplayPlayer.cs +++ b/osu.Game/Screens/Play/ReplayPlayer.cs @@ -197,8 +197,7 @@ namespace osu.Game.Screens.Play public override void OnSuspending(ScreenTransitionEvent e) { - // safety against filters or samples from the indicator playing long after the screen is exited - failIndicator.RemoveAndDisposeImmediately(); + stopAllAudioEffects(); base.OnSuspending(e); } @@ -208,5 +207,17 @@ namespace osu.Game.Screens.Play failIndicator.RemoveAndDisposeImmediately(); return base.OnExiting(e); } + + private void stopAllAudioEffects() + { + // safety against filters or samples from the indicator playing long after the screen is exited + failIndicator.RemoveAndDisposeImmediately(); + + if (GameplayClockContainer is MasterGameplayClockContainer master) + { + playbackSettings.UserPlaybackRate.UnbindFrom(master.UserPlaybackRate); + master.UserPlaybackRate.SetDefault(); + } + } } }