/// <summary>
        /// Connects <see cref="InputDevice"/> to <see cref="OutputDevice"/>.
        /// </summary>
        /// <exception cref="MidiDeviceException"><see cref="InputDevice"/> is already connected
        /// to <see cref="OutputDevice"/>.</exception>
        public void Connect()
        {
            var result = MidiConnectWinApi.midiConnect(InputDevice.GetHandle(), OutputDevice.GetHandle(), IntPtr.Zero);

            if (result == MidiWinApi.MIDIERR_NOTREADY)
            {
                throw new MidiDeviceException("Specified input device is already connected to an output device.");
            }
        }
Exemple #2
0
 public void Connect()
 {
     MidiConnectWinApi.midiConnect(InputDevice.GetHandle(), OutputDevice.GetHandle(), IntPtr.Zero);
 }