1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 09:02:55 +08:00

Fix TrackManager usage

This commit is contained in:
Shane Woolcock 2019-01-13 23:10:16 +10:30
parent f70cb81a3f
commit 6c35393d1a
2 changed files with 4 additions and 4 deletions

View File

@ -26,7 +26,7 @@ namespace osu.Game.Audio
[BackgroundDependencyLoader]
private void load(AudioManager audio, FrameworkConfigManager config)
{
trackManager = new TrackManager(new OnlineStore());
trackManager = new TrackManager(new OnlineStore(), audio.Callback);
this.audio = audio;
audio.AddItem(trackManager);

View File

@ -29,7 +29,7 @@ namespace osu.Game.Beatmaps
this.store = store;
this.textureStore = textureStore;
this.audioManager = audioManager;
trackManager = audioManager?.Track;
trackManager = audioManager.Track;
}
protected override IBeatmap GetBeatmap()
@ -71,7 +71,7 @@ namespace osu.Game.Beatmaps
try
{
var trackData = store.GetStream(getPathForFile(Metadata.AudioFile));
return trackData == null ? null : trackManager?.CreateTrack(trackData) ?? new TrackBass(trackData);
return trackData == null ? null : trackManager.CreateTrack(trackData);
}
catch
{
@ -92,7 +92,7 @@ namespace osu.Game.Beatmaps
try
{
var trackData = store.GetStream(getPathForFile(Metadata.AudioFile));
return trackData == null ? null : trackManager?.CreateWaveform(trackData) ?? new Waveform(trackData);
return trackData == null ? null : trackManager.CreateWaveform(trackData);
}
catch
{