summaryrefslogtreecommitdiff
path: root/libs/ardour/lv2_plugin.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/lv2_plugin.cc')
-rw-r--r--libs/ardour/lv2_plugin.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/libs/ardour/lv2_plugin.cc b/libs/ardour/lv2_plugin.cc
index f33c9db6ac..228fd74117 100644
--- a/libs/ardour/lv2_plugin.cc
+++ b/libs/ardour/lv2_plugin.cc
@@ -2703,6 +2703,22 @@ LV2Plugin::parameter_is_input(uint32_t param) const
return _port_flags[param] & PORT_INPUT;
}
+uint32_t
+LV2Plugin::designated_bypass_port ()
+{
+#ifdef LV2_EXTENDED
+ const LilvPort* port = NULL;
+ LilvNode* 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;
+}
+
void
LV2Plugin::print_parameter(uint32_t param, char* buf, uint32_t len) const
{