Merge pull request #124 from insolace/master

::send ignores realtime messages, quick fix
This commit is contained in:
Francois Best 2019-08-22 08:52:06 +02:00 committed by GitHub
commit 2ffbdef8da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 8 deletions

View File

@ -135,6 +135,8 @@ void MidiInterface<SerialPort, Settings>::send(MidiType inType,
DataByte inData2,
Channel inChannel)
{
if (inType <= PitchBend) // Channel messages
{
// Then test if channel is valid
if (inChannel >= MIDI_CHANNEL_OFF ||
inChannel == MIDI_CHANNEL_OMNI ||
@ -142,9 +144,6 @@ void MidiInterface<SerialPort, Settings>::send(MidiType inType,
{
return; // Don't send anything
}
if (inType <= PitchBend) // Channel messages
{
// Protection: remove MSBs on data
inData1 &= 0x7f;
inData2 &= 0x7f;