summaryrefslogtreecommitdiffstats
path: root/src/module/ingen_module.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-03-06 10:23:19 +0000
committerDavid Robillard <d@drobilla.net>2010-03-06 10:23:19 +0000
commit059f20c9666234f2be01498ee04f1e7ee795ba8f (patch)
treeef0d53073d53012aeaa7d084fccf477b166c0684 /src/module/ingen_module.cpp
parent085a451dfec54126be1b9346899c81d82e6eb58e (diff)
downloadingen-059f20c9666234f2be01498ee04f1e7ee795ba8f.tar.gz
ingen-059f20c9666234f2be01498ee04f1e7ee795ba8f.tar.bz2
ingen-059f20c9666234f2be01498ee04f1e7ee795ba8f.zip
Save Ingen patches as working standard LV2 plugin bundles.
This allows you to create an Ingen patch in Ingen running as a Jack client, save it, then load that patch as an LV2 plugin in any LV2 compliant host. Eliminate (hopefully) all static data in the engine (for multiple instantiations in a single process). More API/ABI stable interface for Ingen::Shared::World. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2533 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/module/ingen_module.cpp')
-rw-r--r--src/module/ingen_module.cpp38
1 files changed, 4 insertions, 34 deletions
diff --git a/src/module/ingen_module.cpp b/src/module/ingen_module.cpp
index 167fd0f2..140aec2e 100644
--- a/src/module/ingen_module.cpp
+++ b/src/module/ingen_module.cpp
@@ -28,46 +28,16 @@
extern "C" {
-static Ingen::Shared::World* world = NULL;
-
Ingen::Shared::World*
-ingen_get_world()
+ingen_world_new(Raul::Configuration* conf, int& argc, char**& argv)
{
- static Ingen::Shared::World* world = NULL;
-
- if (!world) {
- world = new Ingen::Shared::World();
- world->rdf_world = new Redland::World();
-#ifdef HAVE_SLV2
- world->slv2_world = slv2_world_new_using_rdf_world(world->rdf_world->world());
- world->lv2_features = new Ingen::Shared::LV2Features();
- world->uris = PtrCast<Ingen::Shared::LV2URIMap>(
- world->lv2_features->feature(LV2_URI_MAP_URI));
- slv2_world_load_all(world->slv2_world);
-#else
- world->uris = SharedPtr<Ingen::Shared::LV2URIMap>(
- new Ingen::Shared::LV2URIMap());
-#endif
- world->engine.reset();
- world->local_engine.reset();
- }
-
- return world;
+ return new Ingen::Shared::World(conf, argc, argv);
}
void
-ingen_destroy_world()
+ingen_world_free(Ingen::Shared::World* world)
{
- if (world) {
- world->unload_all();
-#ifdef HAVE_SLV2
- slv2_world_free(world->slv2_world);
- delete world->lv2_features;
-#endif
- delete world->rdf_world;
- delete world;
- world = NULL;
- }
+ delete world;
}
} // extern "C"