mirror of
https://github.com/ppy/osu.git
synced 2024-12-16 12:42:56 +08:00
Fix TrackManager usage
This commit is contained in:
parent
f70cb81a3f
commit
6c35393d1a
@ -26,7 +26,7 @@ namespace osu.Game.Audio
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(AudioManager audio, FrameworkConfigManager config)
|
private void load(AudioManager audio, FrameworkConfigManager config)
|
||||||
{
|
{
|
||||||
trackManager = new TrackManager(new OnlineStore());
|
trackManager = new TrackManager(new OnlineStore(), audio.Callback);
|
||||||
|
|
||||||
this.audio = audio;
|
this.audio = audio;
|
||||||
audio.AddItem(trackManager);
|
audio.AddItem(trackManager);
|
||||||
|
@ -29,7 +29,7 @@ namespace osu.Game.Beatmaps
|
|||||||
this.store = store;
|
this.store = store;
|
||||||
this.textureStore = textureStore;
|
this.textureStore = textureStore;
|
||||||
this.audioManager = audioManager;
|
this.audioManager = audioManager;
|
||||||
trackManager = audioManager?.Track;
|
trackManager = audioManager.Track;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override IBeatmap GetBeatmap()
|
protected override IBeatmap GetBeatmap()
|
||||||
@ -71,7 +71,7 @@ namespace osu.Game.Beatmaps
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
var trackData = store.GetStream(getPathForFile(Metadata.AudioFile));
|
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
|
catch
|
||||||
{
|
{
|
||||||
@ -92,7 +92,7 @@ namespace osu.Game.Beatmaps
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
var trackData = store.GetStream(getPathForFile(Metadata.AudioFile));
|
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
|
catch
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user