public MidiInputDeviceTests(ITestOutputHelper output) : base(output)
        {
            _inputDeviceMock = new RtMidiInputDeviceMock();
            _sut             = new MidiInputDevice(_inputDeviceMock, string.Empty);

            _sut.NoteOff += (IMidiInputDevice sender, in NoteOffMessage e) => _noteOffMessages.Enqueue(e);
            _sut.NoteOn  += (IMidiInputDevice sender, in NoteOnMessage e) => _noteOnMessages.Enqueue(e);
            _sut.PolyphonicKeyPressure += (IMidiInputDevice sender, in PolyphonicKeyPressureMessage e) => _polyphonicKeyPressureMessages.Enqueue(e);
            _sut.ControlChange         += (IMidiInputDevice sender, in ControlChangeMessage e) => _controlChangeMessages.Enqueue(e);
            _sut.ProgramChange         += (IMidiInputDevice sender, in ProgramChangeMessage e) => _programChangeMessages.Enqueue(e);
            _sut.ChannelPressure       += (IMidiInputDevice sender, in ChannelPressureMessage e) => _channelPressureMessages.Enqueue(e);
            _sut.PitchBend             += (IMidiInputDevice sender, in PitchBendMessage e) => _pitchBendMessages.Enqueue(e);
            _sut.Nrpn += (IMidiInputDevice sender, in NrpnMessage e) => _nrpnMessages.Enqueue(e);
        }
Esempio n. 2
0
        public MidiInputDeviceTests(ITestOutputHelper output) : base(output)
        {
            _inputDeviceMock = new RtMidiInputDeviceMock();
            _sut             = new MidiInputDevice(_inputDeviceMock, string.Empty);

            _sut.NoteOff += (IMidiInputDevice sender, in NoteOffMessage e) => _noteOffMessages.Enqueue(e);
            _sut.NoteOn  += (IMidiInputDevice sender, in NoteOnMessage e) => _noteOnMessages.Enqueue(e);
            _sut.PolyphonicKeyPressure += (IMidiInputDevice sender, in PolyphonicKeyPressureMessage e) => _polyphonicKeyPressureMessages.Enqueue(e);
            _sut.ControlChange         += (IMidiInputDevice sender, in ControlChangeMessage e) => _controlChangeMessages.Enqueue(e);
            _sut.ProgramChange         += (IMidiInputDevice sender, in ProgramChangeMessage e) => _programChangeMessages.Enqueue(e);
            _sut.ChannelPressure       += (IMidiInputDevice sender, in ChannelPressureMessage e) => _channelPressureMessages.Enqueue(e);
            _sut.PitchBend             += (IMidiInputDevice sender, in PitchBendMessage e) => _pitchBendMessages.Enqueue(e);
            _sut.Nrpn  += (IMidiInputDevice sender, in NrpnMessage e) => _nrpnMessages.Enqueue(e);
            _sut.SysEx += (IMidiInputDevice sender, in SysExMessage e) => _sysExMessages.Enqueue(e);
            _sut.MidiTimeCodeQuarterFrame += (IMidiInputDevice sender, in MidiTimeCodeQuarterFrameMessage e) => _midiTimeCodeQuarterFrameMessages.Enqueue(e);
            _sut.SongPositionPointer      += (IMidiInputDevice sender, in SongPositionPointerMessage e) => _songPositionPointerMessages.Enqueue(e);
            _sut.SongSelect  += (IMidiInputDevice sender, in SongSelectMessage e) => _songSelectMessages.Enqueue(e);
            _sut.TuneRequest += (IMidiInputDevice sender, in TuneRequestMessage e) => _tuneRequestMessages.Enqueue(e);
        }