示例#1
0
        public void Dispose()
        {
            if (_rtmidi == null || !_rtmidi->ok) return;

            RtMidiDll.InFree(_rtmidi);
            _rtmidi = null;

            System.GC.SuppressFinalize(this);
        }
示例#2
0
        public void Dispose()
        {
            if (_rtmidi == null || !_rtmidi->ok)
            {
                return;
            }

            RtMidiDll.InFree(_rtmidi);
            _rtmidi = null;

            foreach (var dev in _channels)
            {
                if (dev != null)
                {
                    InputSystem.RemoveDevice(dev);
                }
            }

            System.GC.SuppressFinalize(this);
        }
示例#3
0
        public void Dispose()
        {
            if (_rtmidi == null || !_rtmidi->ok)
            {
                return;
            }

            if (_mode == Mode.In)
            {
                RtMidiDll.InFree(_rtmidi);
            }
            else // _mode == Mode.Out
            {
                RtMidiDll.OutFree(_rtmidi);
            }

            _rtmidi = null;

            System.GC.SuppressFinalize(this);
        }