summaryrefslogtreecommitdiff
path: root/client/midi.c
diff options
context:
space:
mode:
Diffstat (limited to 'client/midi.c')
-rw-r--r--client/midi.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/client/midi.c b/client/midi.c
index 46a4687..25ec551 100644
--- a/client/midi.c
+++ b/client/midi.c
@@ -45,7 +45,6 @@ int midi_init(midi_t* m, const char* device)
slist_init(&(m->done_data_), free);
-
int ret = snd_rawmidi_open(&(m->input_), &(m->output_), device, SND_RAWMIDI_NONBLOCK);
if(ret < 0) {
error(0, 0, "MIDI: cannot open port '%s': %s", device, snd_strerror(ret));
@@ -106,7 +105,7 @@ static int midi_enqueue_lang_switch(midi_t* m, osc_t* o, const char* lang, const
done_data->write_idx_ = 0;
assert(slist_add(&(m->done_data_), done_data));
- return 0; // mixer_switch_lang(x, lang, &midi_lang_switch_done, done_data);
+ return osc_switch_lang(o, lang, &midi_lang_switch_done, done_data);
}
static int midi_handle_note_on(midi_t* m, osc_t* o)
@@ -127,10 +126,10 @@ static int midi_handle_note_off(midi_t* m, osc_t* o)
static int midi_handle_message(midi_t* m, osc_t* o)
{
- int i;
- printf("MIDI: ");
- for (i = 0; i < sizeof(m->buf_); ++i)
- printf("%02X%c", m->buf_[i], (i >= (sizeof(m->buf_)-1)) ? '\n' : ' ');
+ /* int i; */
+ /* printf("MIDI: "); */
+ /* for (i = 0; i < sizeof(m->buf_); ++i) */
+ /* printf("%02X%c", m->buf_[i], (i >= (sizeof(m->buf_)-1)) ? '\n' : ' '); */
int ret = 0;
switch(m->buf_[0]) {