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:
commit
ef4191fb57
@ -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();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user