Skip to content

Commit

Permalink
Fix MIDI player reading number of MIDI tracks
Browse files Browse the repository at this point in the history
  • Loading branch information
derselbst committed Oct 12, 2024
1 parent 686bc60 commit 31a56d8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/midi/fluid_midi.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,7 @@ fluid_midi_file_read_mthd(fluid_midi_file *mf)
"Sorry, but MIDI Format %d is not supported by this player", mf->type);
return FLUID_FAILED;
}
mf->ntracks = (unsigned) mthd[11];
mf->ntracks += (unsigned int)(mthd[10]) << 16;
mf->ntracks = (signed)((unsigned)(mthd[10]) << 8 | (unsigned) mthd[11]);

if((signed char)mthd[12] < 0)
{
Expand Down

0 comments on commit 31a56d8

Please sign in to comment.