1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 19:22:54 +08:00

Ensure music playback is stopped when retrying by any means

This commit is contained in:
Dean Herbert 2020-10-07 17:40:54 +09:00
parent 338b4c56ce
commit 0f6eb9d4cb

View File

@ -441,6 +441,10 @@ namespace osu.Game.Screens.Play
/// </summary>
public void Restart()
{
// at the point of restarting the track should either already be paused or the volume should be zero.
// stopping here is to ensure music doesn't become audible after exiting back to PlayerLoader.
musicController.Stop();
sampleRestart?.Play();
RestartRequested?.Invoke();