feat: remove hard limit on number of channels
Co-authored-by: aider (deepseek/deepseek-reasoner) <aider@aider.chat>
This commit is contained in:
@@ -35,7 +35,7 @@ void midi_handle_events(void *port_buffer, jack_nframes_t nframes) {
|
||||
int ck = atomic_load(&control_key_active);
|
||||
if (ck) {
|
||||
atomic_store(&control_key_active, 0);
|
||||
if (note < 16) {
|
||||
if (note < 16 && note < atomic_load(&channel_capacity)) {
|
||||
command_t cmd = {
|
||||
.type = CMD_BIND_CHANNEL, .channel = -1, .data = note};
|
||||
queue_push(&cmd_queue, cmd);
|
||||
@@ -53,7 +53,7 @@ void midi_handle_events(void *port_buffer, jack_nframes_t nframes) {
|
||||
} break;
|
||||
case 62: {
|
||||
int bch = atomic_load(&bind_channel);
|
||||
if (bch >= 0 && bch < MAX_CHANNELS) {
|
||||
if (bch >= 0 && bch < atomic_load(&channel_capacity)) {
|
||||
command_t cmd = {.type = CMD_CYCLE, .channel = bch, .data = 0};
|
||||
queue_push(&cmd_queue, cmd);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user