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/gui/ConnectWindow.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/gui/ConnectWindow.cpp') diff --git a/src/gui/ConnectWindow.cpp b/src/gui/ConnectWindow.cpp index aae826e4..ec440501 100644 --- a/src/gui/ConnectWindow.cpp +++ b/src/gui/ConnectWindow.cpp @@ -74,13 +74,13 @@ ConnectWindow::ConnectWindow(BaseObjectType* cobject, const Glib::RefPtrlocal_engine) { + if (world->local_engine()) { _mode = INTERNAL; if (_widgets_loaded) _internal_radio->set_active(true); } - set_connected_to(world->engine); + set_connected_to(world->engine()); connect(true); } @@ -89,7 +89,7 @@ ConnectWindow::start(Ingen::Shared::World* world) void ConnectWindow::set_connected_to(SharedPtr engine) { - App::instance().world()->engine = engine; + App::instance().world()->set_engine(engine); if (!_widgets_loaded) return; @@ -111,7 +111,7 @@ ConnectWindow::set_connected_to(SharedPtr engine) _connect_button->set_sensitive(true); _disconnect_button->set_sensitive(false); - if (App::instance().world()->local_engine) + if (App::instance().world()->local_engine()) _internal_radio->set_sensitive(true); else _internal_radio->set_sensitive(false); @@ -178,7 +178,7 @@ ConnectWindow::connect(bool existing) } if (existing) - uri = world->engine->uri().str(); + uri = world->engine()->uri().str(); // Create client-side listener SharedPtr tsci(new ThreadedSigClientInterface(1024)); @@ -198,14 +198,14 @@ ConnectWindow::connect(bool existing) if (!existing) { #ifdef HAVE_LIBLO if (scheme == "osc.udp" || scheme == "osc.tcp") - world->engine = SharedPtr(new OSCEngineSender(uri)); + world->set_engine(SharedPtr(new OSCEngineSender(uri))); #endif #ifdef HAVE_SOUP if (scheme == "http") - world->engine = SharedPtr(new HTTPEngineSender(world, uri)); + world->set_engine(SharedPtr(new HTTPEngineSender(world, uri))); #endif } else { - uri = world->engine->uri().str(); + uri = world->engine()->uri().str(); scheme = uri.substr(0, uri.find(":")); } @@ -223,8 +223,8 @@ ConnectWindow::connect(bool existing) const string cmd = string("ingen -e --engine-port=").append(port_str); if (Raul::Process::launch(cmd)) { - world->engine = SharedPtr( - new OSCEngineSender(string("osc.udp://localhost:").append(port_str))); + world->set_engine(SharedPtr( + new OSCEngineSender(string("osc.udp://localhost:").append(port_str)))); // FIXME: static args SharedPtr tsci(new ThreadedSigClientInterface(1024)); @@ -246,15 +246,15 @@ ConnectWindow::connect(bool existing) } else #endif // defined(HAVE_LIBLO) || defined(HAVE_SOUP) if (_mode == INTERNAL) { - if (!world->local_engine) + if (!world->local_engine()) world->load("ingen_engine"); SharedPtr client(new SigClientInterface()); - if (!world->local_engine->driver()) + if (!world->local_engine()->driver()) world->load("ingen_jack"); - world->local_engine->activate(); + world->local_engine()->activate(); App::instance().attach(client); App::instance().register_callbacks(); -- cgit v1.2.1