diff options
Diffstat (limited to 'src/server')
-rw-r--r-- | src/server/Engine.cpp | 2 | ||||
-rw-r--r-- | src/server/JackDriver.cpp | 6 | ||||
-rw-r--r-- | src/server/LV2RequestRunFeature.hpp | 4 | ||||
-rw-r--r-- | src/server/ingen_engine.cpp | 8 | ||||
-rw-r--r-- | src/server/ingen_jack.cpp | 10 | ||||
-rw-r--r-- | src/server/ingen_lv2.cpp | 39 |
6 files changed, 33 insertions, 36 deletions
diff --git a/src/server/Engine.cpp b/src/server/Engine.cpp index 971b41e0..5652db27 100644 --- a/src/server/Engine.cpp +++ b/src/server/Engine.cpp @@ -106,7 +106,7 @@ Engine::engine_store() const size_t Engine::event_queue_size() const { - return world()->conf()->option("queue-size").get_int(); + return world()->conf().option("queue-size").get_int(); } void diff --git a/src/server/JackDriver.cpp b/src/server/JackDriver.cpp index 6fa1f890..8803c0c6 100644 --- a/src/server/JackDriver.cpp +++ b/src/server/JackDriver.cpp @@ -267,15 +267,15 @@ JackDriver::activate() } if (!_client) - attach(world->conf()->option("jack-server").get_string(), - world->conf()->option("jack-client").get_string(), NULL); + attach(world->conf().option("jack-server").get_string(), + world->conf().option("jack-client").get_string(), NULL); jack_set_process_callback(_client, process_cb, this); _is_activated = true; _engine.process_context().activate( - world->conf()->option("parallelism").get_int(), + world->conf().option("parallelism").get_int(), is_realtime()); if (jack_activate(_client)) { diff --git a/src/server/LV2RequestRunFeature.hpp b/src/server/LV2RequestRunFeature.hpp index b15100d2..fddab4b8 100644 --- a/src/server/LV2RequestRunFeature.hpp +++ b/src/server/LV2RequestRunFeature.hpp @@ -45,10 +45,10 @@ struct RequestRunFeature : public Ingen::Shared::LV2Features::Feature { const void* data) { Info* info = reinterpret_cast<Info*>(handle); - if (!info->world->local_engine()) + if (!info->world->engine()) return LV2_WORKER_ERR_UNKNOWN; - Engine* engine = (Engine*)info->world->local_engine().get(); + Engine* engine = (Engine*)info->world->engine().get(); engine->message_context()->run( dynamic_cast<NodeImpl*>(info->node), engine->driver()->frame_time()); diff --git a/src/server/ingen_engine.cpp b/src/server/ingen_engine.cpp index 917e83cf..6e5665cb 100644 --- a/src/server/ingen_engine.cpp +++ b/src/server/ingen_engine.cpp @@ -26,11 +26,11 @@ struct IngenEngineModule : public Ingen::Shared::Module { virtual void load(Ingen::Shared::World* world) { Server::set_denormal_flags(); SharedPtr<Server::Engine> engine(new Server::Engine(world)); - world->set_local_engine(engine); - if (!world->engine()) { - world->set_engine(SharedPtr<Interface>(engine->interface(), NullDeleter<Interface>)); + world->set_engine(engine); + if (!world->interface()) { + world->set_interface(SharedPtr<Interface>(engine->interface(), NullDeleter<Interface>)); } - assert(world->local_engine() == engine); + assert(world->engine() == engine); } }; diff --git a/src/server/ingen_jack.cpp b/src/server/ingen_jack.cpp index f47cbff2..a1f068fe 100644 --- a/src/server/ingen_jack.cpp +++ b/src/server/ingen_jack.cpp @@ -26,19 +26,19 @@ using namespace Ingen; struct IngenJackModule : public Ingen::Shared::Module { void load(Ingen::Shared::World* world) { - if (((Server::Engine*)world->local_engine().get())->driver()) { + if (((Server::Engine*)world->engine().get())->driver()) { Raul::warn << "Engine already has a driver" << std::endl; return; } Server::JackDriver* driver = new Server::JackDriver( - *(Server::Engine*)world->local_engine().get()); - const Raul::Configuration::Value& s = world->conf()->option("jack-server"); + *(Server::Engine*)world->engine().get()); + const Raul::Configuration::Value& s = world->conf().option("jack-server"); const std::string server_name = s.is_valid() ? s.get_string() : ""; driver->attach(server_name, - world->conf()->option("jack-client").get_string(), + world->conf().option("jack-client").get_string(), NULL); - ((Server::Engine*)world->local_engine().get())->set_driver( + ((Server::Engine*)world->engine().get())->set_driver( SharedPtr<Server::Driver>(driver)); } }; diff --git a/src/server/ingen_lv2.cpp b/src/server/ingen_lv2.cpp index df88f7d8..3d3a367c 100644 --- a/src/server/ingen_lv2.cpp +++ b/src/server/ingen_lv2.cpp @@ -34,7 +34,6 @@ #include "ingen/serialisation/Serialiser.hpp" #include "ingen/shared/AtomReader.hpp" #include "ingen/shared/AtomWriter.hpp" -#include "ingen/shared/Configuration.hpp" #include "ingen/shared/Store.hpp" #include "ingen/shared/World.hpp" #include "ingen/shared/runtime_paths.hpp" @@ -144,7 +143,7 @@ public: , _reader(*engine.world()->uri_map().get(), *engine.world()->uris().get(), engine.world()->forge(), - *engine.world()->engine().get()) + *engine.world()->interface().get()) , _writer(*engine.world()->uri_map().get(), *engine.world()->uris().get(), *this) @@ -330,13 +329,12 @@ private: }; struct IngenPlugin { - Ingen::Forge forge; - Ingen::Shared::Configuration* conf; - Ingen::Shared::World* world; - MainThread* main; - LV2_URID_Map* map; - int argc; - char** argv; + Ingen::Forge forge; + Ingen::Shared::World* world; + MainThread* main; + LV2_URID_Map* map; + int argc; + char** argv; }; static Lib::Patches @@ -402,7 +400,6 @@ ingen_instantiate(const LV2_Descriptor* descriptor, } IngenPlugin* plugin = (IngenPlugin*)malloc(sizeof(IngenPlugin)); - plugin->conf = new Ingen::Shared::Configuration(); plugin->main = NULL; plugin->map = NULL; LV2_URID_Unmap* unmap = NULL; @@ -415,21 +412,21 @@ ingen_instantiate(const LV2_Descriptor* descriptor, } plugin->world = new Ingen::Shared::World( - plugin->conf, plugin->argc, plugin->argv, plugin->map, unmap); + plugin->argc, plugin->argv, plugin->map, unmap); if (!plugin->world->load_module("serialisation")) { delete plugin->world; return NULL; } SharedPtr<Server::Engine> engine(new Server::Engine(plugin->world)); - plugin->world->set_local_engine(engine); + plugin->world->set_engine(engine); plugin->main = new MainThread(engine); plugin->main->set_name("Main"); SharedPtr<EventWriter> interface = SharedPtr<EventWriter>(engine->interface(), NullDeleter<EventWriter>); - plugin->world->set_engine(interface); + plugin->world->set_interface(interface); Raul::Thread::get().set_context(Server::THREAD_PRE_PROCESS); Server::ThreadManager::single_threaded = true; @@ -453,7 +450,7 @@ ingen_instantiate(const LV2_Descriptor* descriptor, engine->post_processor()->process(); plugin->world->parser()->parse_file(plugin->world, - plugin->world->engine().get(), + plugin->world->interface().get(), patch->filename); while (engine->pending_events()) { @@ -472,7 +469,7 @@ ingen_connect_port(LV2_Handle instance, uint32_t port, void* data) using namespace Ingen::Server; IngenPlugin* me = (IngenPlugin*)instance; - Server::Engine* engine = (Server::Engine*)me->world->local_engine().get(); + Server::Engine* engine = (Server::Engine*)me->world->engine().get(); LV2Driver* driver = (LV2Driver*)engine->driver(); if (port < driver->ports().size()) { driver->ports().at(port)->set_buffer(data); @@ -487,7 +484,7 @@ static void ingen_activate(LV2_Handle instance) { IngenPlugin* me = (IngenPlugin*)instance; - me->world->local_engine()->activate(); + me->world->engine()->activate(); //((EventWriter*)me->world->engine().get())->start(); me->main->start(); } @@ -496,7 +493,7 @@ static void ingen_run(LV2_Handle instance, uint32_t sample_count) { IngenPlugin* me = (IngenPlugin*)instance; - Server::Engine* engine = (Server::Engine*)me->world->local_engine().get(); + Server::Engine* engine = (Server::Engine*)me->world->engine().get(); // FIXME: don't do this every call Raul::Thread::get().set_context(Ingen::Server::THREAD_PROCESS); ((LV2Driver*)engine->driver())->run(sample_count); @@ -506,15 +503,15 @@ static void ingen_deactivate(LV2_Handle instance) { IngenPlugin* me = (IngenPlugin*)instance; - me->world->local_engine()->deactivate(); + me->world->engine()->deactivate(); } static void ingen_cleanup(LV2_Handle instance) { IngenPlugin* me = (IngenPlugin*)instance; - me->world->set_local_engine(SharedPtr<Ingen::Server::Engine>()); - me->world->set_engine(SharedPtr<Ingen::Interface>()); + me->world->set_engine(SharedPtr<Ingen::Server::Engine>()); + me->world->set_interface(SharedPtr<Ingen::Interface>()); delete me->world; free(instance); } @@ -607,7 +604,7 @@ ingen_restore(LV2_Handle instance, char* real_path = map_path->absolute_path(map_path->handle, state_path); plugin->world->parser()->parse_file(plugin->world, - plugin->world->engine().get(), + plugin->world->interface().get(), real_path); free(real_path); return LV2_STATE_SUCCESS; |