protected override void Dispose(DisposeObjectKind disposeKind) { Close(); if (disposeKind == DisposeObjectKind.ManagedAndUnmanagedResources) { _outPort.Dispose(); } }
public void ReleaseMidi() { if (_midiIn != null) { _midiIn.MessageReceived -= OnMidiInMessageReceived; _midiIn.Dispose(); } if (_midiOut != null) { _midiOut.Dispose(); } }
public void Dispose() { _inPort.Dispose(); _outPort.Dispose(); }