]> git.cworth.org Git - scherzo/commitdiff
Fix another bug with stuck notes.
authorCarl Worth <cworth@cworth.org>
Mon, 26 Sep 2011 17:34:52 +0000 (10:34 -0700)
committerCarl Worth <cworth@cworth.org>
Mon, 26 Sep 2011 17:34:52 +0000 (10:34 -0700)
When multiple MIDI messages were received in a single buffer, the code
was neglecting to advance the string pointer it was using to
parse. This was causing it to parse the first message several times
and ignore all following messages.

Fix this silly bug.

scherzo.c

index 955f5b7551d773f865feabb1761424515a49a233..88cae44fe4cdb85bde4669a41e713f463767915c 100644 (file)
--- a/scherzo.c
+++ b/scherzo.c
@@ -369,6 +369,7 @@ on_midi_input (unused (GIOChannel *channel),
                                          next, remaining, &event);
 
        remaining -= consumed;
+       next += consumed;
 
        switch (event.type) {
        case SND_SEQ_EVENT_NONE: