コード例 #1
0
        public void Start()
        {
            EnsureDeviceIsNotDisposed();
            EnsureHandleIsCreated();

            PrepareSysExBuffer();
            ProcessMmResult(() => MidiInWinApi.midiInStart(_handle));
            _startTime = DateTime.UtcNow;
        }
コード例 #2
0
        /// <summary>
        /// Starts 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 StartEventsListening()
        {
            EnsureDeviceIsNotDisposed();
            EnsureHandleIsCreated();

            PrepareSysExBuffer();
            ProcessMmResult(MidiInWinApi.midiInStart(_handle));

            IsListeningForEvents = true;
        }