shithub: riscv

Download patch

ref: 4e04e03142a4e43c208dcf62ca165ad3a05dcc96
parent: 24611cf5ed0f34edc6b843a621b63b710f51570a
author: qwx <devnull@localhost>
date: Tue Jul 10 19:26:17 EDT 2018

midi: properly skip sysex messages

this fixes playing any midi files containing such messages
example: prince of persia midis from vgmpf wiki

--- a/sys/src/games/midi.c
+++ b/sys/src/games/midi.c
@@ -181,6 +181,11 @@
 		get16(src);
 		break;
 	case 0xF:
+		if((t & 0xF) == 0){
+			while(get8(src) != 0xF7)
+				;
+			return;
+		}
 		t = get8(src);
 		n = get8(src);
 		switch(t){