diff options
author | David Robillard <d@drobilla.net> | 2011-04-16 21:50:14 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-04-16 21:50:14 +0000 |
commit | da618852b67d64f5fed686234f5a626c33812c87 (patch) | |
tree | 2226d335f85478689a9c0f83f1f58bd9e29d635e /src/engine/ingen_lv2.cpp | |
parent | e867b85118f275a263ef1a3162567d90be62d0ac (diff) | |
download | ingen-da618852b67d64f5fed686234f5a626c33812c87.tar.gz ingen-da618852b67d64f5fed686234f5a626c33812c87.tar.bz2 ingen-da618852b67d64f5fed686234f5a626c33812c87.zip |
Add EngineBase, a pure virtual public interface for the engine.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3155 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/ingen_lv2.cpp')
-rw-r--r-- | src/engine/ingen_lv2.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/engine/ingen_lv2.cpp b/src/engine/ingen_lv2.cpp index a6f178ff..69daa7ae 100644 --- a/src/engine/ingen_lv2.cpp +++ b/src/engine/ingen_lv2.cpp @@ -267,11 +267,12 @@ ingen_instantiate(const LV2_Descriptor* descriptor, plugin->world->set_local_engine(engine); SharedPtr<QueuedEngineInterface> interface( - new Ingen::QueuedEngineInterface(*plugin->world->local_engine(), - event_queue_size)); + new Ingen::QueuedEngineInterface( + *engine.get(), + event_queue_size)); plugin->world->set_engine(interface); - plugin->world->local_engine()->add_event_source(interface); + engine->add_event_source(interface); Raul::Thread::get().set_context(THREAD_PRE_PROCESS); ThreadManager::single_threaded = true; @@ -309,9 +310,9 @@ ingen_instantiate(const LV2_Descriptor* descriptor, static void ingen_connect_port(LV2_Handle instance, uint32_t port, void* data) { - IngenPlugin* me = (IngenPlugin*)instance; - SharedPtr<Ingen::Engine> engine = me->world->local_engine(); - Ingen::LV2::LV2Driver* driver = (Ingen::LV2::LV2Driver*)engine->driver(); + IngenPlugin* me = (IngenPlugin*)instance; + Ingen::Engine* engine = (Ingen::Engine*)me->world->local_engine().get(); + Ingen::LV2::LV2Driver* driver = (Ingen::LV2::LV2Driver*)engine->driver(); if (port < driver->ports().size()) { driver->ports().at(port)->set_buffer(data); assert(driver->ports().at(port)->patch_port()->index() == port); @@ -330,10 +331,11 @@ ingen_activate(LV2_Handle instance) static void ingen_run(LV2_Handle instance, uint32_t sample_count) { - IngenPlugin* me = (IngenPlugin*)instance; + IngenPlugin* me = (IngenPlugin*)instance; + Ingen::Engine* engine = (Ingen::Engine*)me->world->local_engine().get(); // FIXME: don't do this every call Raul::Thread::get().set_context(Ingen::THREAD_PROCESS); - ((Ingen::LV2::LV2Driver*)me->world->local_engine()->driver())->run(sample_count); + ((Ingen::LV2::LV2Driver*)engine->driver())->run(sample_count); } static void |