This commit is contained in:
Lukas Schwabe 2022-01-22 23:37:03 -08:00 committed by GitHub
commit b990328454
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 24 additions and 15 deletions

View File

@ -1095,24 +1095,33 @@ bool MidiInterface<Transport, Settings, Platform>::parse()
mMessage.valid = true; mMessage.valid = true;
// Activate running status (if enabled for the received type) // Activate running status (if enabled for the received type)
switch (mMessage.type) if (Settings::UseRunningStatus) {
{
case NoteOff:
case NoteOn:
case AfterTouchPoly:
case ControlChange:
case ProgramChange:
case AfterTouchChannel:
case PitchBend:
// Running status enabled: store it from received message
mRunningStatus_RX = mPendingMessage[0];
break;
default: switch (mMessage.type)
{
case NoteOff:
case NoteOn:
case AfterTouchPoly:
case ControlChange:
case ProgramChange:
case AfterTouchChannel:
case PitchBend:
// Running status enabled: store it from received message
mRunningStatus_RX = mPendingMessage[0];
break;
default:
// No running status // No running status
mRunningStatus_RX = InvalidType; mRunningStatus_RX = InvalidType;
break; break;
}
} }
else {
mRunningStatus_RX = InvalidType;
}
return true; return true;
} }
else else