Skip to content

Commit d84a8a2

Browse files
committed
Pass jack client to plugins inside lv2 options
Signed-off-by: falkTX <falktx@falktx.com>
1 parent 92fbabf commit d84a8a2

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

src/effects.c

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,7 @@ typedef struct URIDS_T {
527527
LV2_URID bufsz_minBlockLength;
528528
LV2_URID bufsz_nomimalBlockLength;
529529
LV2_URID bufsz_sequenceSize;
530+
LV2_URID jack_client;
530531
LV2_URID log_Error;
531532
LV2_URID log_Note;
532533
LV2_URID log_Trace;
@@ -756,7 +757,7 @@ static LV2_HMI_WidgetControl g_hmi_wc;
756757
static MOD_License_Feature g_license;
757758
static LV2_Atom_Forge g_lv2_atom_forge;
758759
static LV2_Log_Log g_lv2_log;
759-
static LV2_Options_Option g_options[8];
760+
static LV2_Options_Option g_options[9];
760761
static LV2_State_Free_Path g_state_freePath;
761762
static LV2_URI_Map_Feature g_uri_map;
762763
static LV2_URID_Map g_urid_map;
@@ -3008,6 +3009,9 @@ static void GetFeatures(effect_t *effect)
30083009
features[FEATURE_TERMINATOR] = NULL;
30093010

30103011
effect->features = features;
3012+
3013+
/* also update jack client option value */
3014+
g_options[7].value = effect->jack_client;
30113015
}
30123016

30133017
/**
@@ -4209,6 +4213,8 @@ int effects_init(void* client)
42094213
g_urids.bufsz_nomimalBlockLength = urid_to_id(g_symap, LV2_BUF_SIZE__nominalBlockLength);
42104214
g_urids.bufsz_sequenceSize = urid_to_id(g_symap, LV2_BUF_SIZE__sequenceSize);
42114215

4216+
g_urids.jack_client = urid_to_id(g_symap, "http://jackaudio.org/metadata/client");
4217+
42124218
g_urids.log_Error = urid_to_id(g_symap, LV2_LOG__Error);
42134219
g_urids.log_Note = urid_to_id(g_symap, LV2_LOG__Note);
42144220
g_urids.log_Trace = urid_to_id(g_symap, LV2_LOG__Trace);
@@ -4289,11 +4295,18 @@ int effects_init(void* client)
42894295

42904296
g_options[7].context = LV2_OPTIONS_INSTANCE;
42914297
g_options[7].subject = 0;
4292-
g_options[7].key = 0;
4293-
g_options[7].size = 0;
4294-
g_options[7].type = 0;
4298+
g_options[7].key = g_urids.jack_client;
4299+
g_options[7].size = sizeof(jack_client_t*);
4300+
g_options[7].type = g_urids.jack_client;
42954301
g_options[7].value = NULL;
42964302

4303+
g_options[8].context = LV2_OPTIONS_INSTANCE;
4304+
g_options[8].subject = 0;
4305+
g_options[8].key = 0;
4306+
g_options[8].size = 0;
4307+
g_options[8].type = 0;
4308+
g_options[8].value = NULL;
4309+
42974310
#ifdef __MOD_DEVICES__
42984311
g_hmi_wc.size = sizeof(g_hmi_wc);
42994312
g_hmi_wc.set_led_with_blink = HMIWidgetsSetLedWithBlink;

0 commit comments

Comments
 (0)