diff options
author | David Robillard <d@drobilla.net> | 2010-03-06 10:23:19 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-03-06 10:23:19 +0000 |
commit | 059f20c9666234f2be01498ee04f1e7ee795ba8f (patch) | |
tree | ef0d53073d53012aeaa7d084fccf477b166c0684 /src/engine/ingen_engine.cpp | |
parent | 085a451dfec54126be1b9346899c81d82e6eb58e (diff) | |
download | ingen-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/engine/ingen_engine.cpp')
-rw-r--r-- | src/engine/ingen_engine.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/engine/ingen_engine.cpp b/src/engine/ingen_engine.cpp index b2f626c7..d25bcf46 100644 --- a/src/engine/ingen_engine.cpp +++ b/src/engine/ingen_engine.cpp @@ -25,13 +25,15 @@ using namespace Ingen; struct IngenEngineModule : public Ingen::Shared::Module { - void load(Ingen::Shared::World* world) { + virtual void load(Ingen::Shared::World* world) { set_denormal_flags(); - world->local_engine = SharedPtr<Engine>(new Engine(world)); + SharedPtr<Engine> engine(new Ingen::Engine(world)); + world->set_local_engine(engine); SharedPtr<QueuedEngineInterface> interface( - new Ingen::QueuedEngineInterface(*world->local_engine, event_queue_size)); - world->engine = interface; - world->local_engine->add_event_source(interface); + new Ingen::QueuedEngineInterface(*engine.get(), event_queue_size)); + world->set_engine(interface); + engine->add_event_source(interface); + assert(world->local_engine() == engine); } }; |