Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/milkymist
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 9ede465
Choose a base ref
...
head repository: m-labs/milkymist
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 58daf4c
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Dec 1, 2011

  1. softusb: don't forget notifying the host when there are news from MIDI

    The host interrupt wasn't asserted when enqueuing MIDI messages.
    No surprise some controls acted strangely ...
    wpwrak authored and Sebastien Bourdeauducq committed Dec 1, 2011
    Copy the full SHA
    dbcce91 View commit details
  2. softusb: accept everything but non-MIDI and system messages

    This patch removes the limitation to control change messages. We can
    now also have "piano" notes and so on.
    wpwrak authored and Sebastien Bourdeauducq committed Dec 1, 2011
    Copy the full SHA
    58daf4c View commit details
Showing with 7 additions and 2 deletions.
  1. +7 −2 softusb-input/main.c
9 changes: 7 additions & 2 deletions softusb-input/main.c
Original file line number Diff line number Diff line change
@@ -485,6 +485,7 @@ static char process_midi(unsigned char *buf, unsigned char len)
{
unsigned char end = len & ~3;
unsigned char i, m, j;
char sent_something = 0;

/*
* In theory, control changes should be heralded by a CIN of 0xB,
@@ -496,14 +497,18 @@ 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++)
COMLOC_MIDI(4*m+j) = buf[i+j];
COMLOC_MIDI_PRODUCE = (m + 1) & 15;
sent_something = 1;
}
return 0;
return sent_something;
}

static void poll(struct ep_status *ep,