Fix meta_len MIDI entry parsing

meta_length is a varlen, not a single byte.  Use get_varlen() to handle
>127 byte entries automatically.
This commit is contained in:
Earle F. Philhower, III committed 2017-10-30 20:08:23 -07:00
1 parent e11da8c325
commit 4b52ce7397
1 file changed
+1 -1
+1 -1
View File
@@ -213,7 +213,7 @@ void AudioGeneratorMIDI::find_note (int tracknum) {
}
if (event == 0xff) { /* meta-event */
meta_cmd = buffer_byte (t->trkptr++);
meta_length = buffer_byte (t->trkptr++);
meta_length = get_varlen(&t->trkptr);
switch (meta_cmd) {
case 0x00:
break;