mirror of
https://github.com/ppy/osu.git
synced 2024-12-13 18:23:22 +08:00
Don’t directly instantiate TrackBass
This commit is contained in:
parent
bf8d256858
commit
4ff1318162
@ -21,12 +21,14 @@ namespace osu.Game.Beatmaps
|
|||||||
{
|
{
|
||||||
private readonly IResourceStore<byte[]> store;
|
private readonly IResourceStore<byte[]> store;
|
||||||
private readonly AudioManager audioManager;
|
private readonly AudioManager audioManager;
|
||||||
|
private readonly TrackManager trackManager;
|
||||||
|
|
||||||
public BeatmapManagerWorkingBeatmap(IResourceStore<byte[]> store, BeatmapInfo beatmapInfo, AudioManager audioManager)
|
public BeatmapManagerWorkingBeatmap(IResourceStore<byte[]> store, BeatmapInfo beatmapInfo, AudioManager audioManager)
|
||||||
: base(beatmapInfo)
|
: base(beatmapInfo)
|
||||||
{
|
{
|
||||||
this.store = store;
|
this.store = store;
|
||||||
this.audioManager = audioManager;
|
this.audioManager = audioManager;
|
||||||
|
this.trackManager = audioManager.Track;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override IBeatmap GetBeatmap()
|
protected override IBeatmap GetBeatmap()
|
||||||
@ -68,7 +70,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 : new TrackBass(trackData);
|
return trackData == null ? null : trackManager.CreateTrack(trackData, false);
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
|
@ -22,6 +22,6 @@
|
|||||||
<PackageReference Include="NUnit" Version="3.11.0" />
|
<PackageReference Include="NUnit" Version="3.11.0" />
|
||||||
<PackageReference Include="SharpRaven" Version="2.4.0" />
|
<PackageReference Include="SharpRaven" Version="2.4.0" />
|
||||||
<PackageReference Include="System.ComponentModel.Annotations" Version="4.5.0" />
|
<PackageReference Include="System.ComponentModel.Annotations" Version="4.5.0" />
|
||||||
<PackageReference Include="ppy.osu.Framework" Version="0.0.7626" />
|
<PackageReference Include="ppy.osu.Framework" Version="0.0.7633" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
@ -73,8 +73,8 @@
|
|||||||
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="xamarinios10" />
|
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="xamarinios10" />
|
||||||
<package id="NUnit" version="3.10.1" targetFramework="xamarinios10" />
|
<package id="NUnit" version="3.10.1" targetFramework="xamarinios10" />
|
||||||
<package id="ppy.Microsoft.Diagnostics.Runtime" version="0.9.180305.1" targetFramework="xamarinios10" />
|
<package id="ppy.Microsoft.Diagnostics.Runtime" version="0.9.180305.1" targetFramework="xamarinios10" />
|
||||||
<package id="ppy.osu.Framework" version="0.0.7626" targetFramework="xamarinios10" />
|
<package id="ppy.osu.Framework" version="0.0.7633" targetFramework="xamarinios10" />
|
||||||
<package id="ppy.osu.Framework.iOS" version="0.0.7626" targetFramework="xamarinios10" />
|
<package id="ppy.osu.Framework.iOS" version="0.0.7633" targetFramework="xamarinios10" />
|
||||||
<package id="ppy.osuTK.iOS" version="1.0.41" targetFramework="xamarinios10" />
|
<package id="ppy.osuTK.iOS" version="1.0.41" targetFramework="xamarinios10" />
|
||||||
<package id="ppy.osuTK.NS20" version="1.0.41" targetFramework="xamarinios10" />
|
<package id="ppy.osuTK.NS20" version="1.0.41" targetFramework="xamarinios10" />
|
||||||
<package id="Remotion.Linq" version="2.2.0" targetFramework="xamarinios10" />
|
<package id="Remotion.Linq" version="2.2.0" targetFramework="xamarinios10" />
|
||||||
|
Loading…
Reference in New Issue
Block a user