mirror of
https://github.com/SK-la/osu-framework.git
synced 2026-03-13 11:20:31 +00:00
27 lines
715 B
C#
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;
|
|
}
|
|
}
|
|
}
|