private void RecordForm_FormClosing(object sender, FormClosingEventArgs e) { if (_playing) { e.Cancel = true; } _playback.Unload(); }
public SequencePlayerV1(Sequence s) { _sequence = s; // V1 sequence only knows about the MCI engine _playback = new MCIPlayback(); // close any open music files _playback.Unload(); _playback.Load(s); tmrTimer = new Timer(); tmrTimer.Interval = (int)_sequence.Interval; tmrTimer.Tick += new EventHandler(tmrTimer_Tick); }
public SequencePlayerV2(Sequence s) { _sequence = s; switch (_sequence.MusicType) { case MusicType.Sample: _playback = new MCIPlayback(); break; case MusicType.MIDI: _playback = new MIDIPlayback(); break; } // close any open music files _playback.Unload(); _playback.Load(s); }
public override void Unload() { Stop(); _playback.Unload(); }