Skip to content

Commit

Permalink
Run the entire disposal on the audio thread
Browse files Browse the repository at this point in the history
Just like how `AudioThread` does it.
  • Loading branch information
Susko3 committed Aug 22, 2023
1 parent 9d9d7e5 commit f00de67
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions osu.Framework.Tests/Audio/BassTestComponents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ public void RunOnAudioThread(Action action)
internal TrackBass GetTrack() => (TrackBass)TrackStore.Get("Resources.Tracks.sample-track.mp3");
internal SampleBass GetSample() => (SampleBass)SampleStore.Get("Resources.Tracks.sample-track.mp3");

public void Dispose()
public void Dispose() => RunOnAudioThread(() =>
{
allComponents.Dispose();
Update(); // Actually runs the disposal.
allComponents.Update(); // Actually runs the disposal.
Bass.Free();
}
});
}
}

0 comments on commit f00de67

Please sign in to comment.