public void Dispose() { DisposePorts(); _probe?.Dispose(); _probe = null; }
public void Update() { if (_probe == null) { _probe = new MidiProbe(); } // Rescan the ports if the count of the ports doesn't match. if (_ports.Count != _probe.PortCount) { DisposePorts(); ScanPorts(); } // Process MIDI message queues in the port objects. foreach (var p in _ports) { p.ProcessMessageQueue(); } }