diff options
author | Robin Gareus <robin@gareus.org> | 2016-07-05 19:14:25 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-07-05 23:30:21 +0200 |
commit | ac325cea25ed8fef467ae7888da131d1d166b960 (patch) | |
tree | 45b000331276a48c194d342b4e19f817e1b14abe /libs/ardour/lv2_plugin.cc | |
parent | e845b9f9357c4ff471c02b1f63a61275bb4a7d28 (diff) |
implement lv2:designation processing#enable (for bypass ports)
Diffstat (limited to 'libs/ardour/lv2_plugin.cc')
-rw-r--r-- | libs/ardour/lv2_plugin.cc | 16 |
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 { |