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:
parent
f70cb81a3f
commit
6c35393d1a
@ -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);
|
||||
|
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user