summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-04-19 18:29:16 +0000
committerDavid Robillard <d@drobilla.net>2007-04-19 18:29:16 +0000
commit6b3443ebabdeec0b908fb505e30c1422b96589b7 (patch)
tree7cfe81e88cfa92a8ef413f319dd143bd9a1a5e0d /src
parent71d83ce627f8d8ddfc381312155d1a05082618b2 (diff)
downloadingen-6b3443ebabdeec0b908fb505e30c1422b96589b7.tar.gz
ingen-6b3443ebabdeec0b908fb505e30c1422b96589b7.tar.bz2
ingen-6b3443ebabdeec0b908fb505e30c1422b96589b7.zip
Renamed SLV2Model SLV2World.
Updated Ingen for SLV2 API changes. git-svn-id: http://svn.drobilla.net/lad/ingen@459 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/libs/client/Makefile.am4
-rw-r--r--src/libs/client/PluginModel.h9
-rw-r--r--src/libs/engine/LV2Node.cpp2
-rw-r--r--src/libs/engine/NodeFactory.cpp8
-rw-r--r--src/libs/engine/NodeFactory.h5
-rw-r--r--src/progs/ingenuity/ControlGroups.cpp6
-rw-r--r--src/progs/ingenuity/main.cpp10
7 files changed, 22 insertions, 22 deletions
diff --git a/src/libs/client/Makefile.am b/src/libs/client/Makefile.am
index e7296268..89dff982 100644
--- a/src/libs/client/Makefile.am
+++ b/src/libs/client/Makefile.am
@@ -2,9 +2,9 @@ if BUILD_CLIENT_LIB
noinst_LTLIBRARIES = libingenclient.la
-libingenclient_la_CXXFLAGS = @RAUL_CFLAGS@ @LXML2_CFLAGS@ @RASQAL_CFLAGS@ @RAPTOR_CFLAGS@ @LSIGCPP_CFLAGS@ @GLIBMM_CFLAGS@ -I$(top_srcdir)/src/common -DPKGDATADIR=\"$(pkgdatadir)\"
+libingenclient_la_CXXFLAGS = @RAUL_CFLAGS@ @SLV2_CFLAGS@ @LXML2_CFLAGS@ @RASQAL_CFLAGS@ @RAPTOR_CFLAGS@ @LSIGCPP_CFLAGS@ @GLIBMM_CFLAGS@ -I$(top_srcdir)/src/common -DPKGDATADIR=\"$(pkgdatadir)\"
-libingenclient_la_LIBADD = @RAUL_LIBS@ @LXML2_LIBS@ @LOSC_LIBS@ @RASQAL_LIBS@ @RAPTOR_LIBS@ @LSIGCPP_LIBS@ @GLIBMM_LIBS@
+libingenclient_la_LIBADD = @RAUL_LIBS@ @SLV2_LIBS@ @LXML2_LIBS@ @LOSC_LIBS@ @RASQAL_LIBS@ @RAPTOR_LIBS@ @LSIGCPP_LIBS@ @GLIBMM_LIBS@
libingenclient_la_SOURCES = \
OSCEngineSender.h \
diff --git a/src/libs/client/PluginModel.h b/src/libs/client/PluginModel.h
index d6ffb2cc..f1c83377 100644
--- a/src/libs/client/PluginModel.h
+++ b/src/libs/client/PluginModel.h
@@ -46,10 +46,13 @@ public:
{
set_type_from_uri(type_uri);
#ifdef HAVE_SLV2
+ static SLV2World world = NULL;
static SLV2Plugins plugins = NULL;
- if (!plugins) {
- plugins = slv2_plugins_new();
- slv2_plugins_load_all(plugins);
+
+ if (!world) {
+ world = slv2_world_new();
+ slv2_world_load_all(world);
+ plugins = slv2_world_get_all_plugins(world);
}
_slv2_plugin = slv2_plugins_get_by_uri(plugins, uri.c_str());
diff --git a/src/libs/engine/LV2Node.cpp b/src/libs/engine/LV2Node.cpp
index 459d3c78..f45af62c 100644
--- a/src/libs/engine/LV2Node.cpp
+++ b/src/libs/engine/LV2Node.cpp
@@ -82,7 +82,7 @@ LV2Node::instantiate()
Port* port = NULL;
for (size_t j=0; j < num_ports; ++j) {
- SLV2PortID id = slv2_port_by_index(j);
+ SLV2Port id = slv2_plugin_get_port_by_index(_lv2_plugin, j);
// LV2 shortnames are guaranteed to be unique, valid C identifiers
port_name = (char*)slv2_port_get_symbol(_lv2_plugin, id);
diff --git a/src/libs/engine/NodeFactory.cpp b/src/libs/engine/NodeFactory.cpp
index dd8d029d..1214cc20 100644
--- a/src/libs/engine/NodeFactory.cpp
+++ b/src/libs/engine/NodeFactory.cpp
@@ -59,7 +59,8 @@ NodeFactory::NodeFactory()
: _has_loaded(false)
{
#ifdef HAVE_SLV2
- slv2_init();
+ _world = slv2_world_new();
+ slv2_world_load_all(_world);
#endif
// Add builtin plugin types to _internal_plugins list
@@ -95,7 +96,7 @@ NodeFactory::~NodeFactory()
delete (*i);
}
#ifdef HAVE_SLV2
- slv2_finish();
+ slv2_world_free(_world);
#endif
}
@@ -266,8 +267,7 @@ NodeFactory::load_internal_plugin(const string& uri,
void
NodeFactory::load_lv2_plugins()
{
- SLV2Plugins plugins = slv2_plugins_new();
- slv2_plugins_load_all(plugins);
+ SLV2Plugins plugins = slv2_world_get_all_plugins(_world);
//cerr << "[NodeFactory] Found " << slv2_plugins_get_length(plugins) << " LV2 plugins." << endl;
diff --git a/src/libs/engine/NodeFactory.h b/src/libs/engine/NodeFactory.h
index e7812d6a..fcd4179e 100644
--- a/src/libs/engine/NodeFactory.h
+++ b/src/libs/engine/NodeFactory.h
@@ -25,6 +25,9 @@
#include <string>
#include <ladspa.h>
#include <pthread.h>
+#ifdef HAVE_SLV2
+#include <slv2/slv2.h>
+#endif
using std::string; using std::list;
@@ -69,6 +72,8 @@ private:
#ifdef HAVE_SLV2
void load_lv2_plugins();
Node* load_lv2_plugin(const string& plugin_uri, const string& name, size_t poly, Patch* parent, SampleRate srate, size_t buffer_size);
+
+ SLV2World _world;
#endif
#ifdef HAVE_DSSI
diff --git a/src/progs/ingenuity/ControlGroups.cpp b/src/progs/ingenuity/ControlGroups.cpp
index 5234e9fe..9bd96204 100644
--- a/src/progs/ingenuity/ControlGroups.cpp
+++ b/src/progs/ingenuity/ControlGroups.cpp
@@ -106,10 +106,12 @@ SliderControlGroup::init(ControlPanel* panel, SharedPtr<PortModel> pm, bool sepa
if (parent && parent->plugin() && parent->plugin()->type() == PluginModel::LV2) {
min = slv2_port_get_minimum_value(
parent->plugin()->slv2_plugin(),
- slv2_port_by_symbol(pm->path().name().c_str()));
+ slv2_plugin_get_port_by_symbol(parent->plugin()->slv2_plugin(),
+ pm->path().name().c_str()));
max = slv2_port_get_maximum_value(
parent->plugin()->slv2_plugin(),
- slv2_port_by_symbol(pm->path().name().c_str()));
+ slv2_plugin_get_port_by_symbol(parent->plugin()->slv2_plugin(),
+ pm->path().name().c_str()));
}
if (max <= min)
diff --git a/src/progs/ingenuity/main.cpp b/src/progs/ingenuity/main.cpp
index a21c0a8d..4e5789c8 100644
--- a/src/progs/ingenuity/main.cpp
+++ b/src/progs/ingenuity/main.cpp
@@ -23,9 +23,6 @@
#ifdef HAVE_LASH
#include "LashController.h"
#endif
-#ifdef HAVE_SLV2
- #include <slv2/slv2.h>
-#endif
using namespace Ingenuity;
@@ -55,9 +52,6 @@ main(int argc, char** argv)
/* Load settings */
App::instance().configuration()->load_settings();
App::instance().configuration()->apply_settings();
-#ifdef HAVE_SLV2
- slv2_init();
-#endif
#ifdef HAVE_LASH
lash_args_t* lash_args = lash_extract_args(&argc, &argv);
@@ -67,10 +61,6 @@ main(int argc, char** argv)
App::instance().connect_window()->start();
gtk_main.run();
-#ifdef HAVE_SLV2
- slv2_finish();
-#endif
-
return 0;
}