GIT.Harvie.CZ
/
mirrors
/
Programs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update winsize.c
[mirrors/Programs.git]
/
c
/
ghetto-sound-system
/
midi-rx.c
diff --git
a/c/ghetto-sound-system/midi-rx.c
b/c/ghetto-sound-system/midi-rx.c
index 7ee730e83a90c646609badb0e14b367e39670183..0ce32d75a7f05f2fae371729b9f1371aa18f24f1 100644
(file)
--- a/
c/ghetto-sound-system/midi-rx.c
+++ b/
c/ghetto-sound-system/midi-rx.c
@@
-11,7
+11,8
@@
#define MIDI_NOTE_ON 144
#define MIDI_CONTROL 176
#define MIDI_PITCH_BEND 224
#define MIDI_NOTE_ON 144
#define MIDI_CONTROL 176
#define MIDI_PITCH_BEND 224
-#define MIDI_FORMAT "%d:%d:%d\n"
+#define MIDI_FORMAT "%c%c%c"
+#define MIDI_FORMAT_ERR "%d:%d:%d\n"
snd_seq_t *open_seq();
void midi_action(snd_seq_t *seq_handle);
snd_seq_t *open_seq();
void midi_action(snd_seq_t *seq_handle);
@@
-55,6
+56,7
@@
void midi_action(snd_seq_t *seq_handle) {
printf(MIDI_FORMAT, MIDI_NOTE_OFF, ev->data.control.channel, ev->data.note.note);
break;
}
printf(MIDI_FORMAT, MIDI_NOTE_OFF, ev->data.control.channel, ev->data.note.note);
break;
}
+ fflush(stdout); fflush(stderr);
snd_seq_free_event(ev);
} while (snd_seq_event_input_pending(seq_handle, 0) > 0);
}
snd_seq_free_event(ev);
} while (snd_seq_event_input_pending(seq_handle, 0) > 0);
}
This page took
0.137341 seconds
and
4
git commands to generate.