/// <summary> /// Constructs an AudioManager given a track resource store, and a sample resource store. /// </summary> /// <param name="trackStore">The resource store containing all audio tracks to be used in the future.</param> /// <param name="sampleStore">The sample store containing all audio samples to be used in the future.</param> public AudioManager(ResourceStore <byte[]> trackStore, ResourceStore <byte[]> sampleStore) { AudioDevice.ValueChanged += onDeviceChanged; trackStore.AddExtension(@"mp3"); sampleStore.AddExtension(@"wav"); sampleStore.AddExtension(@"mp3"); Thread = new AudioThread(Update, @"Audio"); Thread.Start(); scheduler.Add(() => { globalTrackManager = GetTrackManager(trackStore); globalSampleManager = GetSampleManager(sampleStore); try { setAudioDevice(); } catch { } }); scheduler.AddDelayed(delegate { updateAvailableAudioDevices(); checkAudioDeviceChanged(); }, 1000, true); }
public void SetUp() { thread = new AudioThread(); store = new NamespacedResourceStore <byte[]>(new DllResourceStore(new AssemblyName("osu.Framework")), @"Resources"); manager = new AudioManager(thread, store, store); thread.Start(); }
public virtual void SetUp() { thread = new AudioThread(); var store = new NamespacedResourceStore <byte[]>(new DllResourceStore(@"osu.Framework.Tests.dll"), @"Resources"); Manager = new AudioManagerWithDeviceLoss(thread, store, store); thread.Start(); }
public void SetUp() { Architecture.SetIncludePath(); thread = new AudioThread(); store = new NamespacedResourceStore <byte[]>(new DllResourceStore(@"osu.Framework.dll"), @"Resources"); manager = new AudioManager(thread, store, store); thread.Start(); }