diff options
author | David Robillard <d@drobilla.net> | 2008-10-12 06:47:11 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-10-12 06:47:11 +0000 |
commit | d154ae5b114a6a04acd17a83f6d59caa9ec1005a (patch) | |
tree | 5803f386ddfc608ec565226ad658c9562157ada7 /src/gui | |
parent | 57698964f1e88b2b74a0ce31ffaba3044d884dac (diff) | |
download | ingen-d154ae5b114a6a04acd17a83f6d59caa9ec1005a.tar.gz ingen-d154ae5b114a6a04acd17a83f6d59caa9ec1005a.tar.bz2 ingen-d154ae5b114a6a04acd17a83f6d59caa9ec1005a.zip |
Split OSC/HTTP/JACK dependencies from ingen into separate libraries so engine library doesn't have a link time dependence on liblo/soap/libjack.
Preliminary Ingen LV2 code wrapper (not functional yet).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1653 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/ConnectWindow.cpp | 27 | ||||
-rw-r--r-- | src/gui/ConnectWindow.hpp | 1 |
2 files changed, 25 insertions, 3 deletions
diff --git a/src/gui/ConnectWindow.cpp b/src/gui/ConnectWindow.cpp index bf4d790b..906a16dc 100644 --- a/src/gui/ConnectWindow.cpp +++ b/src/gui/ConnectWindow.cpp @@ -28,6 +28,7 @@ #include "engine/tuning.hpp" #include "engine/Engine.hpp" #include "engine/QueuedEngineInterface.hpp" +#include "engine/Driver.hpp" #ifdef HAVE_SOUP #include "client/HTTPClientReceiver.hpp" #endif @@ -217,12 +218,30 @@ ConnectWindow::connect(bool existing) world->local_engine = SharedPtr<Engine>(_new_engine(world)); } - if ( ! world->engine) - world->engine = world->local_engine->new_queued_interface(); + if ( ! world->engine) { + SharedPtr<QueuedEngineInterface> interface( + new QueuedEngineInterface(*world->local_engine, + Ingen::event_queue_size, Ingen::event_queue_size)); + world->engine = interface; + world->local_engine->set_event_source(interface); + } SharedPtr<SigClientInterface> client(new SigClientInterface()); - world->local_engine->start_jack_driver(); + Ingen::Driver* (*new_driver)( + Ingen::Engine& engine, + std::string server_name, + jack_client_t* jack_client) = NULL; + + if (!world->local_engine->audio_driver()) { + bool found = _engine_jack_module->get_symbol( + "new_jack_audio_driver", (void*&)(new_driver)); + if (found) { + world->local_engine->set_driver(DataType::AUDIO, + SharedPtr<Driver>(new_driver(*world->local_engine, "default", 0))); + } + } + world->local_engine->activate(1); // FIXME: parallelism App::instance().attach(client); @@ -302,6 +321,8 @@ ConnectWindow::load_widgets() cerr << "Unable to find module entry point, internal engine unavailable." << endl; _engine_module.reset(); } + + _engine_jack_module = Ingen::Shared::load_module("ingen_engine_jack"); server_toggled(); } diff --git a/src/gui/ConnectWindow.hpp b/src/gui/ConnectWindow.hpp index 73cc8c68..1635dbde 100644 --- a/src/gui/ConnectWindow.hpp +++ b/src/gui/ConnectWindow.hpp @@ -83,6 +83,7 @@ private: int _connect_stage; SharedPtr<Glib::Module> _engine_module; + SharedPtr<Glib::Module> _engine_jack_module; Ingen::Engine* (*_new_engine)(Ingen::Shared::World* world); Gtk::Image* _icon; |