Beispiel #1
0
 private void RecordForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (_playing)
     {
         e.Cancel = true;
     }
     _playback.Unload();
 }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        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);
        }
Beispiel #4
0
 public override void Unload()
 {
     Stop();
     _playback.Unload();
 }