LV2: don't hide bypass/enabled port..
.. and remove non-standard, deprecated bypass/enable extension
This commit is contained in:
@@ -154,38 +154,6 @@ typedef struct _LV2_License_Interface {
|
||||
@}
|
||||
*/
|
||||
|
||||
/**
|
||||
@defgroup lv2bypass Plugin-provided bypass
|
||||
|
||||
A port with the designation "processing#enable" must
|
||||
control a plugin's internal bypass mode.
|
||||
|
||||
If the port value is larger than zero the plugin processes
|
||||
normally.
|
||||
|
||||
If the port value is zero, the plugin is expected to bypass
|
||||
all signals unmodified.
|
||||
|
||||
The plugin is responsible for providing a click-free transition
|
||||
between the states.
|
||||
|
||||
(values less than zero are reserved for future use:
|
||||
e.g click-free insert/removal of latent plugins.
|
||||
Generally values <= 0 are to be treated as bypassed.)
|
||||
|
||||
lv2:designation <http://ardour.org/lv2/processing#enable> ;
|
||||
|
||||
@{
|
||||
*/
|
||||
|
||||
#define LV2_PROCESSING_URI "http://ardour.org/lv2/processing"
|
||||
#define LV2_PROCESSING_URI_PREFIX LV2_PROCESSING_URI "#"
|
||||
#define LV2_PROCESSING_URI__enable LV2_PROCESSING_URI_PREFIX "enable"
|
||||
|
||||
/**
|
||||
@}
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
@defgroup lv2routing plugin port/routing control
|
||||
|
||||
@@ -196,6 +196,7 @@ public:
|
||||
LilvNode* lv2_connectionOptional;
|
||||
LilvNode* lv2_designation;
|
||||
LilvNode* lv2_enumeration;
|
||||
LilvNode* lv2_enabled;
|
||||
LilvNode* lv2_freewheeling;
|
||||
LilvNode* lv2_inPlaceBroken;
|
||||
LilvNode* lv2_isSideChain;
|
||||
@@ -2595,8 +2596,11 @@ LV2Plugin::describe_parameter(Evoral::Parameter which)
|
||||
|
||||
const LilvPort* port = lilv_plugin_get_port_by_index(_impl->plugin, which.id());
|
||||
|
||||
if (lilv_port_has_property(_impl->plugin, port, _world.ext_notOnGUI)) {
|
||||
return X_("hidden");
|
||||
if (lilv_port_has_property(_impl->plugin, port, _world.ext_notOnGUI)) { //
|
||||
const LilvPort* bypass = lilv_plugin_get_port_by_designation(_impl->plugin, _world.lv2_InputPort, _world.lv2_enabled);
|
||||
if (port != bypass) {
|
||||
return X_("hidden");
|
||||
}
|
||||
}
|
||||
|
||||
const LilvPort* fwport = lilv_plugin_get_port_by_designation(_impl->plugin, _world.lv2_InputPort, _world.lv2_freewheeling);
|
||||
@@ -3405,23 +3409,10 @@ uint32_t
|
||||
LV2Plugin::designated_bypass_port ()
|
||||
{
|
||||
const LilvPort* port = NULL;
|
||||
LilvNode* designation = lilv_new_uri (_world.world, LV2_CORE_PREFIX "enabled");
|
||||
port = lilv_plugin_get_port_by_designation (
|
||||
_impl->plugin, _world.lv2_InputPort, designation);
|
||||
lilv_node_free(designation);
|
||||
port = lilv_plugin_get_port_by_designation (_impl->plugin, _world.lv2_InputPort, _world.lv2_enabled);
|
||||
if (port) {
|
||||
return lilv_port_get_index (_impl->plugin, port);
|
||||
}
|
||||
#ifdef LV2_EXTENDED
|
||||
/* deprecated on 2016-Sep-18 in favor of lv2:enabled */
|
||||
designation = lilv_new_uri (_world.world, LV2_PROCESSING_URI__enable);
|
||||
port = lilv_plugin_get_port_by_designation (
|
||||
_impl->plugin, _world.lv2_InputPort, designation);
|
||||
lilv_node_free(designation);
|
||||
if (port) {
|
||||
return lilv_port_get_index (_impl->plugin, port);
|
||||
}
|
||||
#endif
|
||||
return UINT32_MAX;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user