1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 20:03:21 +08:00

Merge pull request #10406 from peppy/fix-quick-retry-music-playback

Ensure music playback is stopped when retrying by any means
This commit is contained in:
Bartłomiej Dach 2020-10-07 21:32:50 +02:00 committed by GitHub
commit 6627e7e459
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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();