Exemplo n.º 1
0
        private void MidiDeviceOutputTests_Unloaded(object sender, RoutedEventArgs e)
        {
            // Stop the output device watcher
            _midiOutDeviceWatcher.Stop();

            _currentDevice?.Dispose();
        }
Exemplo n.º 2
0
        private void MidiDeviceInput_Unloaded(object sender, RoutedEventArgs e)
        {
            // Stop the input device watcher
            _midiInDeviceWatcher.Stop();

            // Close all MidiInPorts
            foreach (MidiInPort inPort in _midiInPorts)
            {
                inPort.Dispose();
            }
            _midiInPorts.Clear();
        }