mirror of
https://github.com/ppy/osu.git
synced 2026-05-23 22:14:52 +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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user