From 4ff131816249cfa9c97e12715da2b5fd56fb2258 Mon Sep 17 00:00:00 2001 From: Shane Woolcock Date: Fri, 7 Dec 2018 18:40:45 +1030 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20directly=20instantiate=20TrackB?= =?UTF-8?q?ass?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- osu.Game/Beatmaps/BeatmapManager_WorkingBeatmap.cs | 4 +++- osu.Game/osu.Game.csproj | 2 +- osu.iOS/packages.config | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/osu.Game/Beatmaps/BeatmapManager_WorkingBeatmap.cs b/osu.Game/Beatmaps/BeatmapManager_WorkingBeatmap.cs index 77ff53b893..46bc546c4f 100644 --- a/osu.Game/Beatmaps/BeatmapManager_WorkingBeatmap.cs +++ b/osu.Game/Beatmaps/BeatmapManager_WorkingBeatmap.cs @@ -21,12 +21,14 @@ namespace osu.Game.Beatmaps { private readonly IResourceStore store; private readonly AudioManager audioManager; + private readonly TrackManager trackManager; public BeatmapManagerWorkingBeatmap(IResourceStore store, BeatmapInfo beatmapInfo, AudioManager audioManager) : base(beatmapInfo) { this.store = store; this.audioManager = audioManager; + this.trackManager = audioManager.Track; } protected override IBeatmap GetBeatmap() @@ -68,7 +70,7 @@ namespace osu.Game.Beatmaps try { var trackData = store.GetStream(getPathForFile(Metadata.AudioFile)); - return trackData == null ? null : new TrackBass(trackData); + return trackData == null ? null : trackManager.CreateTrack(trackData, false); } catch { diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index ac3857f996..fc610442f4 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -22,6 +22,6 @@ - + \ No newline at end of file diff --git a/osu.iOS/packages.config b/osu.iOS/packages.config index 9ea8058a99..5fdbfa2465 100644 --- a/osu.iOS/packages.config +++ b/osu.iOS/packages.config @@ -73,8 +73,8 @@ - - + +