aboutsummaryrefslogtreecommitdiffstats
path: root/src/jack.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2024-11-20 16:14:04 -0500
committerDavid Robillard <d@drobilla.net>2024-11-24 19:11:32 -0500
commit724aab7a868ed0200afbeecf056e53b5ea16b23d (patch)
tree1f18f1d9185465b253c4de21112e05aeb6739e2f /src/jack.c
parent9ff22388ddcb5ae22aed51302889098cb246a47c (diff)
downloadjalv-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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/jack.c b/src/jack.c
index 28a4d08..a5f26c6 100644
--- a/src/jack.c
+++ b/src/jack.c
@@ -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;
}