@@ -242,6 +242,7 @@ enum PluginHints {
242
242
HINT_HAS_MIDI_INPUT = 1 << 3 ,
243
243
HINT_HAS_STATE = 1 << 4 ,
244
244
HINT_STATE_UNSAFE = 1 << 5 , // state restore needs mutex protection
245
+ HINT_IS_LIVE = 1 << 6 , // needs to be always running, cannot have processing disabled
245
246
};
246
247
247
248
enum TransportSyncMode {
@@ -484,6 +485,7 @@ typedef struct LILV_NODES_T {
484
485
LilvNode * hmi_interface ;
485
486
LilvNode * input ;
486
487
LilvNode * integer ;
488
+ LilvNode * is_live ;
487
489
LilvNode * license_interface ;
488
490
LilvNode * logarithmic ;
489
491
LilvNode * maximum ;
@@ -1795,8 +1797,9 @@ static int ProcessPlugin(jack_nframes_t nframes, void *arg)
1795
1797
if (arg == NULL ) return 0 ;
1796
1798
effect = arg ;
1797
1799
1798
- if (!g_processing_enabled || (
1799
- (effect -> hints & HINT_STATE_UNSAFE ) && pthread_mutex_trylock (& effect -> state_restore_mutex ) != 0 ))
1800
+ if ((effect -> hints & HINT_IS_LIVE ) == 0 &&
1801
+ (!g_processing_enabled || (
1802
+ (effect -> hints & HINT_STATE_UNSAFE ) && pthread_mutex_trylock (& effect -> state_restore_mutex ) != 0 )))
1800
1803
{
1801
1804
for (i = 0 ; i < effect -> output_audio_ports_count ; i ++ )
1802
1805
{
@@ -4273,6 +4276,7 @@ int effects_init(void* client)
4273
4276
g_lilv_nodes .input = lilv_new_uri (g_lv2_data , LILV_URI_INPUT_PORT );
4274
4277
g_lilv_nodes .integer = lilv_new_uri (g_lv2_data , LV2_CORE__integer );
4275
4278
g_lilv_nodes .license_interface = lilv_new_uri (g_lv2_data , MOD_LICENSE__interface );
4279
+ g_lilv_nodes .is_live = lilv_new_uri (g_lv2_data , LV2_CORE__isLive );
4276
4280
g_lilv_nodes .logarithmic = lilv_new_uri (g_lv2_data , LV2_PORT_PROPS__logarithmic );
4277
4281
g_lilv_nodes .maximum = lilv_new_uri (g_lv2_data , LV2_CORE__maximum );
4278
4282
g_lilv_nodes .midiEvent = lilv_new_uri (g_lv2_data , LV2_MIDI__MidiEvent );
@@ -4632,6 +4636,7 @@ int effects_finish(int close_client)
4632
4636
lilv_node_free (g_lilv_nodes .integer );
4633
4637
lilv_node_free (g_lilv_nodes .license_interface );
4634
4638
lilv_node_free (g_lilv_nodes .logarithmic );
4639
+ lilv_node_free (g_lilv_nodes .is_live );
4635
4640
lilv_node_free (g_lilv_nodes .maximum );
4636
4641
lilv_node_free (g_lilv_nodes .midiEvent );
4637
4642
lilv_node_free (g_lilv_nodes .minimum );
@@ -4822,6 +4827,10 @@ int effects_add(const char *uri, int instance, int activate)
4822
4827
effect -> control_index = -1 ;
4823
4828
}
4824
4829
4830
+ /* Query plugin features */
4831
+ if (lilv_plugin_has_feature (effect -> lilv_plugin , g_lilv_nodes .is_live ))
4832
+ effect -> hints |= HINT_IS_LIVE ;
4833
+
4825
4834
/* Query plugin extensions/interfaces */
4826
4835
if (lilv_plugin_has_extension_data (effect -> lilv_plugin , g_lilv_nodes .worker_interface ))
4827
4836
{
0 commit comments