/// <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); }
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); }
/// <summary> /// Initializes the collection instance. /// </summary> public MidiOutPortCapsCollection() : base(new List <MidiOutPortCaps>()) { int count = NativeMethods.midiOutGetNumDevs(); for (int portId = 0; portId < count; portId++) { MidiOutPortCaps caps = MidiOutPort.GetPortCapabilities(portId); Items.Add(caps); } }