Skip to content

Commit

Permalink
Attempt to fix XG System ON sysex message parsing (#1171)
Browse files Browse the repository at this point in the history
  • Loading branch information
derselbst authored Oct 12, 2022
1 parent 1fc6f09 commit 4bd635e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/synth/fluid_synth.c
Original file line number Diff line number Diff line change
Expand Up @@ -2061,8 +2061,9 @@ fluid_synth_sysex(fluid_synth_t *synth, const char *data, int len,
}

/* XG message */
/* note the comparison of device_id, see XG spec 1.23A page 42 "XG System On" */
if(data[0] == MIDI_SYSEX_MANUF_YAMAHA
&& (data[1] == synth->device_id || data[1] == MIDI_SYSEX_DEVICE_ID_ALL)
&& (data[1] == ((synth->device_id & 0x0F) | 0x10) || data[1] == MIDI_SYSEX_DEVICE_ID_ALL)
&& data[2] == MIDI_SYSEX_XG_ID)
{
int result;
Expand Down

0 comments on commit 4bd635e

Please sign in to comment.