Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not attempt to stop preview tracks when arriving from a "track completed" sync #26124

Merged
merged 2 commits into from
Dec 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions osu.Game/Audio/PreviewTrack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,14 @@ public void Stop()

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();
}
Expand Down
Loading