Remove LV2 support via SLV2 (Lilv only now).
git-svn-id: svn://localhost/ardour2/branches/3.0@10184 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
897f29e33c
commit
63cf87beb7
|
@ -28,16 +28,8 @@
|
|||
|
||||
#include "lv2_ui.h"
|
||||
|
||||
/* Note this file is not compiled without either Suil or SLV2 present,
|
||||
and if Suil is present then Lilv is also present.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_SUIL
|
||||
#include <lilv/lilv.h>
|
||||
#include <suil/suil.h>
|
||||
#else
|
||||
#include <slv2/slv2.h>
|
||||
#endif
|
||||
|
||||
using namespace Gtk;
|
||||
using namespace ARDOUR;
|
||||
|
@ -45,9 +37,7 @@ using namespace PBD;
|
|||
|
||||
#define NS_UI "http://lv2plug.in/ns/extensions/ui#"
|
||||
|
||||
#ifdef HAVE_SUIL
|
||||
static SuilHost* ui_host = NULL;
|
||||
#endif
|
||||
|
||||
void
|
||||
LV2PluginUI::lv2_ui_write(void* controller,
|
||||
|
@ -89,16 +79,7 @@ LV2PluginUI::parameter_update(uint32_t port_index, float val)
|
|||
return;
|
||||
}
|
||||
|
||||
#ifdef HAVE_SUIL
|
||||
suil_instance_port_event((SuilInstance*)_inst, port_index, 4, 0, &val);
|
||||
#else
|
||||
SLV2UIInstance inst = (SLV2UIInstance)_inst;
|
||||
const LV2UI_Descriptor* ui_desc = slv2_ui_instance_get_descriptor(inst);
|
||||
LV2UI_Handle ui_handle = slv2_ui_instance_get_handle(inst);
|
||||
if (ui_desc->port_event) {
|
||||
ui_desc->port_event(ui_handle, port_index, 4, 0, &val);
|
||||
}
|
||||
#endif
|
||||
_values[port_index] = val;
|
||||
}
|
||||
|
||||
|
@ -186,7 +167,6 @@ LV2PluginUI::lv2ui_instantiate(const std::string& title)
|
|||
features_dst = (LV2_Feature**)_lv2->features();
|
||||
}
|
||||
|
||||
#ifdef HAVE_SUIL
|
||||
if (!ui_host) {
|
||||
ui_host = suil_host_new(LV2PluginUI::lv2_ui_write, NULL, NULL, NULL);
|
||||
}
|
||||
|
@ -205,23 +185,12 @@ LV2PluginUI::lv2ui_instantiate(const std::string& title)
|
|||
lilv_uri_to_path(lilv_node_as_uri(lilv_ui_get_bundle_uri(ui))),
|
||||
lilv_uri_to_path(lilv_node_as_uri(lilv_ui_get_binary_uri(ui))),
|
||||
features_dst);
|
||||
#else
|
||||
_inst = slv2_ui_instantiate((SLV2Plugin)_lv2->c_plugin(),
|
||||
(SLV2UI)_lv2->c_ui(),
|
||||
LV2PluginUI::lv2_ui_write,
|
||||
this,
|
||||
features_dst);
|
||||
#endif
|
||||
|
||||
if (is_external_ui) {
|
||||
free(features_dst);
|
||||
}
|
||||
|
||||
#ifdef HAVE_SUIL
|
||||
#define GET_WIDGET(inst) suil_instance_get_widget((SuilInstance*)inst);
|
||||
#else
|
||||
#define GET_WIDGET(inst) slv2_ui_instance_get_widget((SLV2UIInstance)inst);
|
||||
#endif
|
||||
|
||||
const uint32_t num_ports = _lv2->num_ports();
|
||||
for (uint32_t i = 0; i < num_ports; ++i) {
|
||||
|
@ -270,19 +239,7 @@ LV2PluginUI::lv2ui_free()
|
|||
remove (*_gui_widget);
|
||||
}
|
||||
|
||||
#ifdef HAVE_SUIL
|
||||
suil_instance_free((SuilInstance*)_inst);
|
||||
#else
|
||||
SLV2UIInstance inst = (SLV2UIInstance)_inst;
|
||||
if (inst) {
|
||||
const LV2UI_Descriptor* ui_desc = slv2_ui_instance_get_descriptor(inst);
|
||||
LV2UI_Handle ui_handle = slv2_ui_instance_get_handle(inst);
|
||||
|
||||
if (ui_desc) {
|
||||
ui_desc->cleanup(ui_handle);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
_inst = NULL;
|
||||
_gui_widget = NULL;
|
||||
|
|
|
@ -360,7 +360,7 @@ PluginUIWindow::app_activated (bool)
|
|||
bool
|
||||
PluginUIWindow::create_lv2_editor(boost::shared_ptr<PluginInsert> insert)
|
||||
{
|
||||
#if defined(HAVE_SLV2) || defined(HAVE_SUIL)
|
||||
#ifdef HAVE_SUIL
|
||||
boost::shared_ptr<LV2Plugin> vp;
|
||||
|
||||
if ((vp = boost::dynamic_pointer_cast<LV2Plugin> (insert->plugin())) == 0) {
|
||||
|
|
|
@ -373,9 +373,6 @@ def build(bld):
|
|||
if bld.is_defined('HAVE_SUIL'):
|
||||
obj.source += [ 'lv2_plugin_ui.cc' ]
|
||||
obj.uselib += ' SUIL '
|
||||
elif bld.is_defined('HAVE_SLV2'):
|
||||
obj.source += [ 'lv2_plugin_ui.cc' ]
|
||||
obj.uselib += ' SLV2 '
|
||||
|
||||
if bld.is_defined('FREESOUND'):
|
||||
obj.source += [ 'sfdb_freesound_mootcher.cc' ]
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -259,12 +259,6 @@ def configure(conf):
|
|||
if conf.is_defined('HAVE_LILV'):
|
||||
autowaf.check_pkg(conf, 'suil-0', uselib_store='SUIL',
|
||||
atleast_version='0.2.0', mandatory=False)
|
||||
else:
|
||||
autowaf.check_pkg(conf, 'slv2', uselib_store='SLV2',
|
||||
atleast_version='0.6.4', mandatory=False)
|
||||
if conf.is_defined('HAVE_SLV2'):
|
||||
autowaf.check_pkg(conf, 'rasqal', uselib_store='RASQAL',
|
||||
atleast_version='0.9.14', mandatory=False)
|
||||
autowaf.check_pkg(conf, 'soundtouch-1.0', uselib_store='SOUNDTOUCH',
|
||||
mandatory=False)
|
||||
autowaf.check_pkg(conf, 'cppunit', uselib_store='CPPUNIT',
|
||||
|
@ -336,7 +330,7 @@ int main(int argc, char **argv) {
|
|||
if ogg_supported():
|
||||
conf.define ('HAVE_OGG', 1)
|
||||
|
||||
if conf.is_defined('HAVE_LILV') or conf.is_defined('HAVE_SLV2'):
|
||||
if conf.is_defined('HAVE_LILV'):
|
||||
conf.define ('LV2_SUPPORT', 1)
|
||||
|
||||
conf.write_config_header('libardour-config.h', remove=False)
|
||||
|
@ -386,10 +380,6 @@ def build(bld):
|
|||
obj.uselib += ['LILV']
|
||||
if bld.is_defined('HAVE_SUIL'):
|
||||
obj.uselib += ['SUIL']
|
||||
elif bld.is_defined('HAVE_SLV2'):
|
||||
obj.source += [ 'lv2_plugin.cc', 'lv2_event_buffer.cc',
|
||||
'uri_map.cc', 'rdff.c' ]
|
||||
obj.uselib += ['SLV2','RASQAL']
|
||||
|
||||
if bld.is_defined('VST_SUPPORT'):
|
||||
obj.source += [ 'vst_plugin.cc', 'session_vst.cc' ]
|
||||
|
|
2
wscript
2
wscript
|
@ -376,7 +376,7 @@ def options(opt):
|
|||
opt.add_option('--gprofile', action='store_true', default=False, dest='gprofile',
|
||||
help='Compile for use with gprofile')
|
||||
opt.add_option('--lv2', action='store_true', default=False, dest='lv2',
|
||||
help='Compile with support for LV2 (if SLV2 or Lilv+Suil is available)')
|
||||
help='Compile with support for LV2 (if Lilv+Suil is available)')
|
||||
opt.add_option('--lxvst', action='store_true', default=False, dest='lxvst',
|
||||
help='Compile with support for linuxVST plugins')
|
||||
opt.add_option('--nls', action='store_true', default=True, dest='nls',
|
||||
|
|
Loading…
Reference in New Issue