예제 #1
0
        public void Dispose()
        {
            _inputDevice.ControlChange         -= InputDevice_ControlChange;
            _inputDevice.NoteOn                -= InputDevice_NoteOn;
            _inputDevice.NoteOff               -= _inputDevice_NoteOff;
            _inputDevice.Nrpn                  -= _inputDevice_Nrpn;
            _inputDevice.ChannelPressure       -= _inputDevice_ChannelPressure;
            _inputDevice.PitchBend             -= _inputDevice_PitchBend;
            _inputDevice.PolyphonicKeyPressure -= _inputDevice_PolyphonicKeyPressure;
            _inputDevice.ProgramChange         -= _inputDevice_ProgramChange;
            _inputDevice.Dispose();

            _outputDevice.Dispose();
        }
예제 #2
0
 private void OnDestroy()
 {
     if (_midiOutput != null)
     {
         ClearPadLEDs();
         _midiOutput.Close();
         _midiOutput.Dispose();
     }
     if (_midiInput != null)
     {
         _midiInput.Close();
         _midiInput.Dispose();
     }
 }