4-implement-scene-switching-engine #4
@@ -42,8 +42,8 @@ void channel_add_midi(jack_client_t *client, int idx) {
|
||||
snprintf(in_name, sizeof(in_name), "channel%d_midi_in", next_channel_id);
|
||||
snprintf(out_name, sizeof(out_name), "channel%d_midi_out", next_channel_id);
|
||||
|
||||
cur[idx].midi_in = jack_port_register(
|
||||
client, in_name, JACK_DEFAULT_MIDI_TYPE, JackPortIsInput, 0);
|
||||
cur[idx].midi_in = jack_port_register(client, in_name, JACK_DEFAULT_MIDI_TYPE,
|
||||
JackPortIsInput, 0);
|
||||
cur[idx].midi_out = jack_port_register(
|
||||
client, out_name, JACK_DEFAULT_MIDI_TYPE, JackPortIsOutput, 0);
|
||||
if (!cur[idx].midi_in || !cur[idx].midi_out) {
|
||||
|
||||
@@ -67,7 +67,8 @@ void midi_handle_events(void *port_buffer, jack_nframes_t nframes) {
|
||||
queue_push(&cmd_queue, cmd);
|
||||
} break;
|
||||
case 66: {
|
||||
command_t cmd = {.type = CMD_ADD_MIDI_CHANNEL, .channel = -1, .data = 0};
|
||||
command_t cmd = {
|
||||
.type = CMD_ADD_MIDI_CHANNEL, .channel = -1, .data = 0};
|
||||
queue_push(&cmd_queue_main_midi, cmd);
|
||||
} break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user