public void Stop() { EnsureDeviceIsNotDisposed(); if (_handle == IntPtr.Zero) { return; } ProcessMmResult(() => MidiInWinApi.midiInStop(_handle)); }
/// <summary> /// Stops listening for incoming MIDI events on the current input device. /// </summary> /// <exception cref="ObjectDisposedException">The current <see cref="InputDevice"/> is disposed.</exception> /// <exception cref="MidiDeviceException">An error occurred on device.</exception> public void StopEventsListening() { EnsureDeviceIsNotDisposed(); if (_handle == IntPtr.Zero) { return; } IsListeningForEvents = false; ProcessMmResult(MidiInWinApi.midiInStop(_handle)); }
private uint StopEventsListeningSilently() { IsListeningForEvents = false; return(MidiInWinApi.midiInStop(_handle)); }