summaryrefslogtreecommitdiffstats
path: root/src/server/ingen_lv2.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-03-14 23:38:53 +0000
committerDavid Robillard <d@drobilla.net>2012-03-14 23:38:53 +0000
commitf8ca7f3cf6f4a0e967eacfd2e1f9a8ae9625c015 (patch)
treea1e7bff65900df78c2283fec7093454a18340195 /src/server/ingen_lv2.cpp
parent31f009967ea0a1664c05d38ea1c126e0c678b20a (diff)
downloadingen-f8ca7f3cf6f4a0e967eacfd2e1f9a8ae9625c015.tar.gz
ingen-f8ca7f3cf6f4a0e967eacfd2e1f9a8ae9625c015.tar.bz2
ingen-f8ca7f3cf6f4a0e967eacfd2e1f9a8ae9625c015.zip
Use the host URI map/unmap when running as a plugin.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4058 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/ingen_lv2.cpp')
-rw-r--r--src/server/ingen_lv2.cpp25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/server/ingen_lv2.cpp b/src/server/ingen_lv2.cpp
index db8a642e..23aa3715 100644
--- a/src/server/ingen_lv2.cpp
+++ b/src/server/ingen_lv2.cpp
@@ -278,24 +278,27 @@ ingen_instantiate(const LV2_Descriptor* descriptor,
return NULL;
}
- IngenPlugin* plugin = (IngenPlugin*)malloc(sizeof(IngenPlugin));
- plugin->conf = new Ingen::Shared::Configuration(&plugin->forge);
- plugin->world = new Ingen::Shared::World(plugin->conf,
- plugin->argc,
- plugin->argv);
- if (!plugin->world->load_module("serialisation")) {
- delete plugin->world;
- return NULL;
- }
- plugin->main = NULL;
- plugin->map = NULL;
+ IngenPlugin* plugin = (IngenPlugin*)malloc(sizeof(IngenPlugin));
+ plugin->conf = new Ingen::Shared::Configuration(&plugin->forge);
+ plugin->main = NULL;
+ plugin->map = NULL;
+ LV2_URID_Unmap* unmap = NULL;
for (int i = 0; features[i]; ++i) {
if (!strcmp(features[i]->URI, LV2_URID_URI "#map")) {
plugin->map = (LV2_URID_Map*)features[i]->data;
+ } else if (!strcmp(features[i]->URI, LV2_URID_URI "#unmap")) {
+ unmap = (LV2_URID_Unmap*)features[i]->data;
}
}
+ plugin->world = new Ingen::Shared::World(
+ plugin->conf, plugin->argc, plugin->argv, plugin->map, unmap);
+ if (!plugin->world->load_module("serialisation")) {
+ delete plugin->world;
+ return NULL;
+ }
+
SharedPtr<Server::Engine> engine(new Server::Engine(plugin->world));
plugin->world->set_local_engine(engine);
plugin->main = new MainThread(engine);