Files
osu-framework/osu.Framework/Audio/Track/TrackManager.cs
2018-04-11 16:34:32 +09:00

27 lines
715 B
C#

// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using osu.Framework.IO.Stores;
namespace osu.Framework.Audio.Track
{
public class TrackManager : AudioCollectionManager<Track>
{
private readonly IResourceStore<byte[]> store;
public TrackManager(IResourceStore<byte[]> store)
{
this.store = store;
}
public Track Get(string name)
{
if (string.IsNullOrEmpty(name)) return null;
TrackBass track = new TrackBass(store.GetStream(name));
AddItem(track);
return track;
}
}
}