From 059f20c9666234f2be01498ee04f1e7ee795ba8f Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 6 Mar 2010 10:23:19 +0000 Subject: 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 --- src/module/ingen_module.cpp | 38 ++++---------------------------------- 1 file changed, 4 insertions(+), 34 deletions(-) (limited to 'src/module/ingen_module.cpp') 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( - world->lv2_features->feature(LV2_URI_MAP_URI)); - slv2_world_load_all(world->slv2_world); -#else - world->uris = SharedPtr( - 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" -- cgit v1.2.1