From 6b3443ebabdeec0b908fb505e30c1422b96589b7 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 19 Apr 2007 18:29:16 +0000 Subject: Renamed SLV2Model SLV2World. Updated Ingen for SLV2 API changes. git-svn-id: http://svn.drobilla.net/lad/ingen@459 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/engine/LV2Node.cpp | 2 +- src/libs/engine/NodeFactory.cpp | 8 ++++---- src/libs/engine/NodeFactory.h | 5 +++++ 3 files changed, 10 insertions(+), 5 deletions(-) (limited to 'src/libs/engine') 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 #include #include +#ifdef HAVE_SLV2 +#include +#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 -- cgit v1.2.1