summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/JackMidiDriver.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-10-04 01:28:27 +0000
committerDavid Robillard <d@drobilla.net>2007-10-04 01:28:27 +0000
commit2f991988c6b3d91652461fe70447e343fb3aa916 (patch)
treee4cd972696c68e6a4758f6df74401b9147c53e41 /src/libs/engine/JackMidiDriver.cpp
parent93197523aaf7b35350a2a26430be7301ad0502b8 (diff)
downloadingen-2f991988c6b3d91652461fe70447e343fb3aa916.tar.gz
ingen-2f991988c6b3d91652461fe70447e343fb3aa916.tar.bz2
ingen-2f991988c6b3d91652461fe70447e343fb3aa916.zip
Fixed port menu (load fancy dynamic menu from Glade).
Renaming of JACK ports. git-svn-id: http://svn.drobilla.net/lad/ingen@820 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/JackMidiDriver.cpp')
-rw-r--r--src/libs/engine/JackMidiDriver.cpp24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/libs/engine/JackMidiDriver.cpp b/src/libs/engine/JackMidiDriver.cpp
index 730f5d80..b07a4e37 100644
--- a/src/libs/engine/JackMidiDriver.cpp
+++ b/src/libs/engine/JackMidiDriver.cpp
@@ -39,11 +39,10 @@ namespace Ingen {
//// JackMidiPort ////
JackMidiPort::JackMidiPort(JackMidiDriver* driver, DuplexPort* patch_port)
-: DriverPort(patch_port->is_input()),
+: DriverPort(patch_port),
Raul::ListNode<JackMidiPort*>(this),
_driver(driver),
- _jack_port(NULL),
- _patch_port(patch_port)
+ _jack_port(NULL)
{
assert(patch_port->poly() == 1);
@@ -240,6 +239,25 @@ JackMidiDriver::remove_port(const Path& path)
return NULL;
}
+
+DriverPort*
+JackMidiDriver::driver_port(const Path& path)
+{
+ assert(ThreadManager::current_thread_id() == THREAD_PROCESS);
+
+ // FIXME: duplex?
+
+ for (Raul::List<JackMidiPort*>::iterator i = _in_ports.begin(); i != _in_ports.end(); ++i)
+ if ((*i)->patch_port()->path() == path)
+ return (*i);
+
+ for (Raul::List<JackMidiPort*>::iterator i = _out_ports.begin(); i != _out_ports.end(); ++i)
+ if ((*i)->patch_port()->path() == path)
+ return (*i);
+
+ return NULL;
+}
+
} // namespace Ingen