public void PlaySimple() { var stream = GetType ().Assembly.GetManifestResourceStream ("Commons.Music.Midi.Tests.Resources.testmidi.mid"); var vt = new VirtualMidiTimeManager (); var player = new MidiPlayer (SmfMusic.Read (stream), MidiAccessManager.Empty, vt); player.PlayAsync (); vt.AdvanceBy (10000); player.PauseAsync (); player.Dispose (); }
public void PlaySimple() { var stream = GetType().Assembly.GetManifestResourceStream("Commons.Music.Midi.Tests.Resources.testmidi.mid"); var vt = new VirtualMidiTimeManager(); var player = new MidiPlayer(MidiMusic.Read(stream), MidiAccessManager.Empty, vt); player.PlayAsync(); vt.AdvanceBy(10000); player.PauseAsync(); player.Dispose(); }