diff options
author | David Robillard <d@drobilla.net> | 2024-11-20 16:14:04 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2024-11-24 19:11:32 -0500 |
commit | 724aab7a868ed0200afbeecf056e53b5ea16b23d (patch) | |
tree | 1f18f1d9185465b253c4de21112e05aeb6739e2f /src/jack.c | |
parent | 9ff22388ddcb5ae22aed51302889098cb246a47c (diff) | |
download | jalv-724aab7a868ed0200afbeecf056e53b5ea16b23d.tar.gz jalv-724aab7a868ed0200afbeecf056e53b5ea16b23d.tar.bz2 jalv-724aab7a868ed0200afbeecf056e53b5ea16b23d.zip |
Simplify port buffer allocation
Diffstat (limited to 'src/jack.c')
-rw-r--r-- | src/jack.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -52,12 +52,13 @@ jack_buffer_size_cb(jack_nframes_t nframes, void* data) { Jalv* const jalv = (Jalv*)data; jalv->block_length = nframes; - jalv->buf_size_set = true; #if USE_JACK_PORT_TYPE_GET_BUFFER_SIZE jalv->midi_buf_size = jack_port_type_get_buffer_size(jalv->backend->client, JACK_DEFAULT_MIDI_TYPE); #endif - jalv_allocate_port_buffers(jalv); + if (jalv->run_state == JALV_RUNNING) { + jalv_allocate_port_buffers(jalv); + } return 0; } |