From 5c99a743027f94afe33ad910f9747381ecf6ad57 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 29 Apr 2026 09:45:39 +0200 Subject: [PATCH 1/2] Keep lilv instances always active, only deactivate jack clients Signed-off-by: falkTX --- src/effects.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/effects.c b/src/effects.c index cd18fb7..b8b7e10 100644 --- a/src/effects.c +++ b/src/effects.c @@ -1147,13 +1147,11 @@ static int BufferSize(jack_nframes_t nframes, void* data) options[4].type = 0; options[4].value = NULL; - if (effect->activated) - lilv_instance_deactivate(effect->lilv_instance); + lilv_instance_deactivate(effect->lilv_instance); effect->options_interface->set(effect->lilv_instance->lv2_handle, options); - if (effect->activated) - lilv_instance_activate(effect->lilv_instance); + lilv_instance_activate(effect->lilv_instance); } } #ifdef HAVE_HYLIA @@ -6472,9 +6470,7 @@ static void effects_remove_inner_loop(int effect_id) if (effect->lilv_instance) { - if (effect->activated) - lilv_instance_deactivate(effect->lilv_instance); - + lilv_instance_deactivate(effect->lilv_instance); lilv_instance_free(effect->lilv_instance); } @@ -6731,7 +6727,6 @@ int effects_activate(int effect_id, int value) if (! effect->activated) { effect->activated = true; - lilv_instance_activate(effect->lilv_instance); if (jack_activate(effect->jack_client) != 0) { @@ -6751,8 +6746,6 @@ int effects_activate(int effect_id, int value) fprintf(stderr, "can't deactivate jack_client\n"); return ERR_JACK_CLIENT_DEACTIVATION; } - - lilv_instance_deactivate(effect->lilv_instance); } } @@ -6765,8 +6758,6 @@ static void* effects_activate_thread(void* arg) effect->activated = true; - lilv_instance_activate(effect->lilv_instance); - if (jack_activate(effect->jack_client) != 0) fprintf(stderr, "can't activate jack_client\n"); @@ -6780,8 +6771,6 @@ static void* effects_deactivate_thread(void* arg) if (jack_deactivate(effect->jack_client) != 0) fprintf(stderr, "can't deactivate jack_client\n"); - lilv_instance_deactivate(effect->lilv_instance); - effect->activated = false; return NULL; From aa8932757132281651e5cde36c3055043dec7366 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 29 Apr 2026 10:04:21 +0200 Subject: [PATCH 2/2] Plugins always start activated (in lv2 sense) Signed-off-by: falkTX --- src/effects.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/effects.c b/src/effects.c index b8b7e10..2aadb75 100644 --- a/src/effects.c +++ b/src/effects.c @@ -6023,10 +6023,10 @@ int effects_add(const char *uri, int instance, int activate) jack_set_buffer_size_callback(jack_client, BufferSize, effect); jack_set_freewheel_callback(jack_client, FreeWheelMode, effect); + lilv_instance_activate(lilv_instance); + if (activate) { - lilv_instance_activate(lilv_instance); - /* Try activate the Jack client */ if (jack_activate(jack_client) != 0) {