Example #1
0
        /// <summary>
        /// Disconnects this Midi Port from the specified <paramref name="outPort"/>.
        /// </summary>
        /// <param name="outPort">A reference to a Midi Out Port. Must not be null.</param>
        public virtual void Disconnect(MidiOutPort outPort)
        {
            Check.IfArgumentNull(outPort, nameof(outPort));
            ThrowIfDisposed();

            int result = NativeMethods.midiDisconnect(MidiSafeHandle, outPort.MidiSafeHandle, IntPtr.Zero);

            MidiOutPort.ThrowIfError(result);
        }
Example #2
0
        public virtual void Disconnect(MidiOutPort outPort)
        {
            Contract.Requires(outPort != null);
            Check.IfArgumentNull(outPort, "outPort");
            this.ThrowIfDisposed();

            int result = NativeMethods.midiDisconnect(MidiSafeHandle, outPort.MidiSafeHandle, IntPtr.Zero);

            MidiOutPort.ThrowIfError(result);
        }