Browse Source

Replace isInitialByte() check with isStatusByte() in MidiDataConcatenator::processSysex() to fix truncated sysex messages

tags/2021-05-28
ed 6 years ago
parent
commit
291d654ece
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      modules/juce_audio_devices/native/juce_MidiDataConcatenator.h

+ 3
- 2
modules/juce_audio_devices/native/juce_MidiDataConcatenator.h View File

@@ -116,7 +116,7 @@ private:
do
{
if (pendingSysexSize > 0 && isInitialByte (*d))
if (pendingSysexSize > 0 && isStatusByte (*d))
{
if (*d == 0xf7)
{
@@ -172,7 +172,8 @@ private:
}
static bool isRealtimeMessage (uint8 byte) { return byte >= 0xf8 && byte <= 0xfe; }
static bool isInitialByte (uint8 byte) { return byte >= 0x80 && byte != 0xf7; }
static bool isStatusByte (uint8 byte) { return byte >= 0x80; }
static bool isInitialByte (uint8 byte) { return isStatusByte (byte) && byte != 0xf7; }
uint8 currentMessage[3];
int currentMessageLen = 0;


Loading…
Cancel
Save