From 41f1be0a68676f33dc1d7dfbb32c5d6440ebd4c9 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 23 Sep 2011 22:00:38 +0000 Subject: Fix broken iterator use (memory errors on erase) in ResourceImpl::set_property. Load all required modules before starting jack (Jack went crazy sometimes otherwise, particularly with ingen running in gdb). Fix insane non-const reference return to Resource::set_property. Exit cleanly on interrupt (Ctrl-C) and terminate (kill). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3480 a436a847-0d15-0410-975c-d299462d15a1 --- src/shared/World.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/shared/World.cpp') diff --git a/src/shared/World.cpp b/src/shared/World.cpp index c583f2fa..eb60a1a5 100644 --- a/src/shared/World.cpp +++ b/src/shared/World.cpp @@ -210,7 +210,7 @@ SharedPtr World::uris() { return _impl->uris; } /** Load an Ingen module. * @return true on success, false on failure -m */ + */ bool World::load_module(const char* name) { @@ -228,6 +228,19 @@ World::load_module(const char* name) } } +bool +World::run_module(const char* name) +{ + Pimpl::Modules::iterator i = _impl->modules.find(name); + if (i == _impl->modules.end()) { + LOG(error) << "Attempt to run unloaded module `" << name << "'" << endl; + return false; + } + + i->second->run(this); + return true; +} + /** Unload all loaded Ingen modules. */ void -- cgit v1.2.1