Esempio n. 1
0
        public void Stop()
        {
            EnsureDeviceIsNotDisposed();

            if (_handle == IntPtr.Zero)
            {
                return;
            }

            ProcessMmResult(() => MidiInWinApi.midiInStop(_handle));
        }
Esempio n. 2
0
        /// <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));
        }
Esempio n. 3
0
 private uint StopEventsListeningSilently()
 {
     IsListeningForEvents = false;
     return(MidiInWinApi.midiInStop(_handle));
 }