1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-24 19:17:20 +08:00

Merge pull request #26124 from bdach/wasapi-preview-track-breakage

Do not attempt to stop preview tracks when arriving from a "track completed" sync
This commit is contained in:
Dean Herbert 2023-12-26 12:07:14 +09:00 committed by GitHub
commit ef4191fb57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -96,10 +96,14 @@ namespace osu.Game.Audio
hasStarted = false;
Track.Stop();
// This pre-check is important, fixes a BASS deadlock in some scenarios.
if (!Track.HasCompleted)
{
Track.Stop();
// Ensure the track is reset immediately on stopping, so the next time it is started it has a correct time value.
Track.Seek(0);
// Ensure the track is reset immediately on stopping, so the next time it is started it has a correct time value.
Track.Seek(0);
}
Stopped?.Invoke();
}