예제 #1
0
        public void Dispose()
        {
            DisposePorts();

            _probe?.Dispose();
            _probe = null;
        }
예제 #2
0
        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();
            }
        }