summaryrefslogtreecommitdiffstats
path: root/src/engine/JackDriver.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-03-06 10:23:19 +0000
committerDavid Robillard <d@drobilla.net>2010-03-06 10:23:19 +0000
commit059f20c9666234f2be01498ee04f1e7ee795ba8f (patch)
treeef0d53073d53012aeaa7d084fccf477b166c0684 /src/engine/JackDriver.cpp
parent085a451dfec54126be1b9346899c81d82e6eb58e (diff)
downloadingen-059f20c9666234f2be01498ee04f1e7ee795ba8f.tar.gz
ingen-059f20c9666234f2be01498ee04f1e7ee795ba8f.tar.bz2
ingen-059f20c9666234f2be01498ee04f1e7ee795ba8f.zip
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
Diffstat (limited to 'src/engine/JackDriver.cpp')
-rw-r--r--src/engine/JackDriver.cpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/engine/JackDriver.cpp b/src/engine/JackDriver.cpp
index 6c66cba3..6e973e1f 100644
--- a/src/engine/JackDriver.cpp
+++ b/src/engine/JackDriver.cpp
@@ -192,7 +192,7 @@ JackDriver::JackDriver(Engine& engine)
, _process_context(engine)
, _root_patch(NULL)
{
- _midi_event_type = _engine.world()->uris->uri_to_id(
+ _midi_event_type = _engine.world()->uris()->uri_to_id(
NULL, "http://lv2plug.in/ns/ext/midi#MidiEvent");
}
@@ -274,8 +274,8 @@ JackDriver::activate()
}
if (!_client)
- attach(_engine.world()->conf->option("jack-server").get_string(),
- _engine.world()->conf->option("jack-client").get_string(), NULL);
+ attach(_engine.world()->conf()->option("jack-server").get_string(),
+ _engine.world()->conf()->option("jack-client").get_string(), NULL);
jack_set_process_callback(_client, process_cb, this);
@@ -338,14 +338,19 @@ JackDriver::add_port(DriverPort* port)
*
* It is the callers responsibility to delete the returned port.
*/
-Raul::List<DriverPort*>::Node*
-JackDriver::remove_port(const Path& path)
+Raul::Deletable*
+JackDriver::remove_port(const Path& path, DriverPort** port)
{
ThreadManager::assert_thread(THREAD_PROCESS);
- for (Raul::List<JackPort*>::iterator i = _ports.begin(); i != _ports.end(); ++i)
- if ((*i)->patch_port()->path() == path)
- return (Raul::List<DriverPort*>::Node*)(_ports.erase(i));
+ for (Raul::List<JackPort*>::iterator i = _ports.begin(); i != _ports.end(); ++i) {
+ if ((*i)->patch_port()->path() == path) {
+ Raul::List<Ingen::JackPort*>::Node* node = _ports.erase(i);
+ if (port)
+ *port = node->elem();
+ return node;
+ }
+ }
LOG(warn) << "Unable to find port " << path << endl;
return NULL;