diff options
author | David Robillard <d@drobilla.net> | 2009-12-19 21:37:50 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-12-19 21:37:50 +0000 |
commit | 19045ab92aa7e996971584a0dc8780d1d58b498b (patch) | |
tree | 619c73deb7fd64ce31c5167490d1ae186dbb2695 /src/gui/ThreadedLoader.cpp | |
parent | 4613a2e15f1122ecf6830171de0ab18dc22fefff (diff) | |
download | ingen-19045ab92aa7e996971584a0dc8780d1d58b498b.tar.gz ingen-19045ab92aa7e996971584a0dc8780d1d58b498b.tar.bz2 ingen-19045ab92aa7e996971584a0dc8780d1d58b498b.zip |
New ingen module (library, not e.g. LV2 plugin) design.
Much cleaner interface and general usage of Ingen as a library.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2314 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/ThreadedLoader.cpp')
-rw-r--r-- | src/gui/ThreadedLoader.cpp | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/src/gui/ThreadedLoader.cpp b/src/gui/ThreadedLoader.cpp index 1a2a209e..ae5c995f 100644 --- a/src/gui/ThreadedLoader.cpp +++ b/src/gui/ThreadedLoader.cpp @@ -19,6 +19,7 @@ #include <string> #include "module/World.hpp" #include "module/Module.hpp" +#include "module/ingen_module.hpp" #include "App.hpp" #include "ThreadedLoader.hpp" #include "client/PatchModel.hpp" @@ -46,24 +47,12 @@ ThreadedLoader::ThreadedLoader(SharedPtr<EngineInterface> engine) SharedPtr<Parser> ThreadedLoader::parser() { - if (_parser) - return _parser; + Ingen::Shared::World* world = ingen_get_world(); - World* world = App::instance().world(); - if (!world->serialisation_module) - world->serialisation_module = Ingen::Shared::load_module("ingen_serialisation"); + if (!world->parser) + world->load("ingen_serialisation"); - if (world->serialisation_module) { - Parser* (*new_parser)() = NULL; - - bool found = App::instance().world()->serialisation_module->get_symbol( - "new_parser", (void*&)new_parser); - - if (found) - _parser = SharedPtr<Parser>(new_parser()); - } - - return _parser; + return world->parser; } @@ -90,6 +79,8 @@ ThreadedLoader::load_patch(bool merge, { _mutex.lock(); + Ingen::Shared::World* world = ingen_get_world(); + Glib::ustring engine_base = ""; if (engine_parent) { if (merge) @@ -110,7 +101,7 @@ ThreadedLoader::load_patch(bool merge, false))); } else { _events.push_back(sigc::hide_return(sigc::bind( - sigc::mem_fun(_parser.get(), &Ingen::Serialisation::Parser::parse_document), + sigc::mem_fun(world->parser.get(), &Ingen::Serialisation::Parser::parse_document), App::instance().world(), App::instance().world()->engine.get(), document_uri, |