Rewrite PreviewTrackManager to avoid constructing TrackBass locally

This paves the way for the framework code quality change
(https://github.com/ppy/osu-framework/pull/4873) which stops exposing
the constructor.

Most of the restructuring here is required to give `PreviewTrackManager`
an adjustable target to apply the global mute.
This commit is contained in:
Dean Herbert
2021-11-09 17:27:07 +09:00
parent 0cb5113601
commit 3b485b5f37
6 changed files with 46 additions and 78 deletions

View File

@ -137,7 +137,7 @@ namespace osu.Game.Tests.Visual
private readonly TestBeatmapManager testBeatmapManager;
public TestWorkingBeatmapCache(TestBeatmapManager testBeatmapManager, AudioManager audioManager, IResourceStore<byte[]> resourceStore, IResourceStore<byte[]> storage, WorkingBeatmap defaultBeatmap, GameHost gameHost)
: base(audioManager, resourceStore, storage, defaultBeatmap, gameHost)
: base(testBeatmapManager.BeatmapTrackStore, audioManager, resourceStore, storage, defaultBeatmap, gameHost)
{
this.testBeatmapManager = testBeatmapManager;
}