diff options
author | Robin Gareus <robin@gareus.org> | 2013-08-25 16:20:27 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2013-08-25 16:21:18 +0200 |
commit | 1d972d05c5e889e4358d18ec6ba0c8e2e11a64e4 (patch) | |
tree | fa108cffdeece8db2f6adf2711e617b2830b18f4 /libs/ardour/lv2_plugin.cc | |
parent | 4cdb018cae8580581359274d6397779b79263bdc (diff) |
add LV2 support for kx:external-ui#
the ABI of http://kxstudio.sf.net/ns/lv2ext/external-ui# is identical to
http://lv2plug.in/ns/extensions/ui#external
It just adds a distinction between #Host and #Widget for cosmetic reasons.
Sadly some newer plugins are released with only support for kxstudio URI :(
Diffstat (limited to 'libs/ardour/lv2_plugin.cc')
-rw-r--r-- | libs/ardour/lv2_plugin.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libs/ardour/lv2_plugin.cc b/libs/ardour/lv2_plugin.cc index 484965e8f4..c6e9b89e5b 100644 --- a/libs/ardour/lv2_plugin.cc +++ b/libs/ardour/lv2_plugin.cc @@ -142,6 +142,7 @@ public: LilvNode* time_Position; LilvNode* ui_GtkUI; LilvNode* ui_external; + LilvNode* ui_externalkx; private: bool _bundle_checked; @@ -561,11 +562,15 @@ LV2Plugin::init(const void* c_plugin, framecnt_t rate) if (!_impl->ui) { LILV_FOREACH(uis, i, uis) { const LilvUI* ui = lilv_uis_get(uis, i); - if (lilv_ui_is_a(ui, _world.ui_external)) { + if (lilv_ui_is_a(ui, _world.ui_externalkx)) { _impl->ui = ui; _impl->ui_type = _world.ui_external; break; } + if (lilv_ui_is_a(ui, _world.ui_external)) { + _impl->ui = ui; + _impl->ui_type = _world.ui_external; + } } } } @@ -613,7 +618,7 @@ LV2Plugin::is_external_ui() const if (!_impl->ui) { return false; } - return lilv_ui_is_a(_impl->ui, _world.ui_external); + return lilv_ui_is_a(_impl->ui, _world.ui_external) || lilv_ui_is_a(_impl->ui, _world.ui_externalkx); } bool @@ -1950,10 +1955,12 @@ LV2World::LV2World() time_Position = lilv_new_uri(world, LV2_TIME__Position); ui_GtkUI = lilv_new_uri(world, LV2_UI__GtkUI); ui_external = lilv_new_uri(world, "http://lv2plug.in/ns/extensions/ui#external"); + ui_externalkx = lilv_new_uri(world, "http://kxstudio.sf.net/ns/lv2ext/external-ui#Widget"); } LV2World::~LV2World() { + lilv_node_free(ui_externalkx); lilv_node_free(ui_external); lilv_node_free(ui_GtkUI); lilv_node_free(time_Position); |