From a573c44a227be59fb7f25e4b1d1cc8238c2329d8 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 14 Aug 2008 06:38:33 +0000 Subject: Don't load engine module twice. git-svn-id: http://svn.drobilla.net/lad/ingen@1376 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/engine/NodeFactory.cpp | 2 +- src/libs/gui/ConnectWindow.cpp | 31 ++++++++++++++----------------- 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/src/libs/engine/NodeFactory.cpp b/src/libs/engine/NodeFactory.cpp index 11324402..c868d067 100644 --- a/src/libs/engine/NodeFactory.cpp +++ b/src/libs/engine/NodeFactory.cpp @@ -268,7 +268,7 @@ NodeFactory::load_ladspa_plugins() _plugins.insert(make_pair(uri, plugin)); } else { - cerr << "Warning: Duplicate LADSPA plugin" << uri + cerr << "Warning: Duplicate " << uri << " - Using " << i->second->library_path() << " over " << lib_path << endl; } diff --git a/src/libs/gui/ConnectWindow.cpp b/src/libs/gui/ConnectWindow.cpp index 4846644a..c9cd948d 100644 --- a/src/libs/gui/ConnectWindow.cpp +++ b/src/libs/gui/ConnectWindow.cpp @@ -70,19 +70,6 @@ ConnectWindow::ConnectWindow(BaseObjectType* cobject, const Glib::RefPtrget_symbol("new_engine", (void*&)_new_engine); - - if (!found) { - cerr << "Unable to find module entry point, internal engine unavailable." << endl; - _engine_module.reset(); - } } @@ -218,9 +205,10 @@ ConnectWindow::connect() } else if (_mode == INTERNAL) { Ingen::Shared::World* world = App::instance().world(); - assert(_new_engine); - if ( ! world->local_engine) + if ( ! world->local_engine) { + assert(_new_engine); world->local_engine = SharedPtr(_new_engine(world)); + } if ( ! world->engine) world->engine = world->local_engine->new_queued_interface(); @@ -297,9 +285,18 @@ ConnectWindow::load_widgets() _connect_button->signal_clicked().connect(sigc::mem_fun(this, &ConnectWindow::connect)); _quit_button->signal_clicked().connect(sigc::mem_fun(this, &ConnectWindow::quit)); - _widgets_loaded = true; - _progress_bar->set_pulse_step(0.01); + _widgets_loaded = true; + + _engine_module = Ingen::Shared::load_module("ingen_engine"); + if (!_engine_module) + cerr << "Unable to load ingen_engine module, internal engine unavailable." << endl; + bool found = _engine_module->get_symbol("new_engine", (void*&)_new_engine); + if (!found) { + cerr << "Unable to find module entry point, internal engine unavailable." << endl; + _engine_module.reset(); + } + server_toggled(); } -- cgit v1.2.1