diff --git a/osu.Game/Screens/SelectV2/SongSelect.cs b/osu.Game/Screens/SelectV2/SongSelect.cs index 0d77baa7f6..ed8555c004 100644 --- a/osu.Game/Screens/SelectV2/SongSelect.cs +++ b/osu.Game/Screens/SelectV2/SongSelect.cs @@ -404,9 +404,6 @@ namespace osu.Game.Screens.SelectV2 private void beginLooping() { - if (!ControlGlobalMusic) - return; - Debug.Assert(!isHandlingLooping); isHandlingLooping = true; @@ -598,18 +595,6 @@ namespace osu.Game.Screens.SelectV2 if (ControlGlobalMusic) { - // Avoid abruptly starting playback at preview point. - if (!music.IsPlaying) - { - music.DuckMomentarily(0, new DuckParameters - { - DuckDuration = 0, - DuckVolumeTo = 0, - RestoreDuration = 800, - RestoreEasing = Easing.OutQuint - }); - } - // restart playback on returning to song select, regardless. // not sure this should be a permanent thing (we may want to leave a user pause paused even on returning) music.ResetTrackAdjustments(); @@ -646,7 +631,23 @@ namespace osu.Game.Screens.SelectV2 updateWedgeVisibility(); - beginLooping(); + if (ControlGlobalMusic) + { + // Avoid abruptly starting playback at preview point. + // Importantly, this should be done before looping is setup to ensure we get the correct imminent `IsPlaying` state. + if (!music.IsPlaying) + { + music.DuckMomentarily(0, new DuckParameters + { + DuckDuration = 0, + DuckVolumeTo = 0, + RestoreDuration = 800, + RestoreEasing = Easing.OutQuint + }); + } + + beginLooping(); + } ensureGlobalBeatmapValid();