From 81e9fb3245bd461ebfee4cfa16d1792e48533f9e Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 12 Mar 2012 06:59:48 +0000 Subject: Centralise atom creation in forge object. Aside from being more greppable and making realtime violations more obvious, this is a step towards using LV2 atoms internally (which needs a factory since the type numbers are dynamic). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4054 a436a847-0d15-0410-975c-d299462d15a1 --- src/server/ingen_lv2.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/server/ingen_lv2.cpp') diff --git a/src/server/ingen_lv2.cpp b/src/server/ingen_lv2.cpp index 9275d555..a568531c 100644 --- a/src/server/ingen_lv2.cpp +++ b/src/server/ingen_lv2.cpp @@ -68,10 +68,10 @@ public: typedef std::vector< SharedPtr > Patches; - Patches patches; - Ingen::Shared::Configuration conf; - int argc; - char** argv; + Patches patches; + Ingen::Shared::Configuration* conf; + int argc; + char** argv; }; /** Library state (constructed/destructed on library load/unload) */ @@ -276,7 +276,7 @@ ingen_instantiate(const LV2_Descriptor* descriptor, } IngenPlugin* plugin = (IngenPlugin*)malloc(sizeof(IngenPlugin)); - plugin->world = new Ingen::Shared::World(&lib.conf, lib.argc, lib.argv); + plugin->world = new Ingen::Shared::World(lib.conf, lib.argc, lib.argv); if (!plugin->world->load_module("serialisation")) { delete plugin->world; return NULL; @@ -513,9 +513,12 @@ Lib::Lib() using namespace Ingen; + // FIXME + Raul::Forge forge; + conf = new Ingen::Shared::Configuration(&forge); Ingen::Shared::set_bundle_path_from_code((void*)&lv2_descriptor); - Ingen::Shared::World* world = new Ingen::Shared::World(&conf, argc, argv); + Ingen::Shared::World* world = new Ingen::Shared::World(conf, argc, argv); if (!world->load_module("serialisation")) { delete world; return; -- cgit v1.2.1