summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/JackAudioDriver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/engine/JackAudioDriver.cpp')
-rw-r--r--src/libs/engine/JackAudioDriver.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/libs/engine/JackAudioDriver.cpp b/src/libs/engine/JackAudioDriver.cpp
index c8a26510..0d4eb878 100644
--- a/src/libs/engine/JackAudioDriver.cpp
+++ b/src/libs/engine/JackAudioDriver.cpp
@@ -48,12 +48,11 @@ namespace Ingen {
//// JackAudioPort ////
JackAudioPort::JackAudioPort(JackAudioDriver* driver, DuplexPort* patch_port)
-: DriverPort(patch_port->is_input()),
+: DriverPort(patch_port),
Raul::ListNode<JackAudioPort*>(this),
_driver(driver),
_jack_port(NULL),
- _jack_buffer(NULL),
- _patch_port(patch_port)
+ _jack_buffer(NULL)
{
assert(patch_port->poly() == 1);
@@ -253,6 +252,19 @@ JackAudioDriver::create_port(DuplexPort* patch_port)
}
+DriverPort*
+JackAudioDriver::driver_port(const Path& path)
+{
+ assert(ThreadManager::current_thread_id() == THREAD_PROCESS);
+
+ for (Raul::List<JackAudioPort*>::iterator i = _ports.begin(); i != _ports.end(); ++i)
+ if ((*i)->patch_port()->path() == path)
+ return (*i);
+
+ return NULL;
+}
+
+
/**** Jack Callbacks ****/