Skip to content

Commit

Permalink
softusb: accept everything but non-MIDI and system messages
Browse files Browse the repository at this point in the history
This patch removes the limitation to control change messages. We can
now also have "piano" notes and so on.
  • Loading branch information
wpwrak authored and Sebastien Bourdeauducq committed Dec 1, 2011
1 parent dbcce91 commit 58daf4c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion softusb-input/main.c
Expand Up @@ -497,7 +497,10 @@ static char process_midi(unsigned char *buf, unsigned char len)
*/

for(i = 0; i != end; i += 4) {
if((buf[i+1] & 0xf0) != 0xb0) /* not a control change */
unsigned char type = buf[i+1] & 0xf0;

/* ignore non-MIDI and all system messages */
if(type < 0x80 || type == 0xf0)
continue;
m = COMLOC_MIDI_PRODUCE;
for(j = 0; j != 4; j++)
Expand Down

0 comments on commit 58daf4c

Please sign in to comment.