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