fix: add null-checks for MIDI ports and use atomic access for channel active flag
Co-authored-by: aider (deepseek/deepseek-reasoner) <aider@aider.chat>
This commit is contained in:
@@ -34,6 +34,7 @@ static unsigned char midi_inject_velocity = 0;
|
||||
|
||||
static int midi_inject_process(jack_nframes_t nframes, void *arg) {
|
||||
(void)arg;
|
||||
if (!midi_inject_port) return 0;
|
||||
void *port_buf = jack_port_get_buffer(midi_inject_port, nframes);
|
||||
if (!port_buf) return 0;
|
||||
jack_midi_clear_buffer(port_buf);
|
||||
|
||||
Reference in New Issue
Block a user