From 293ecec183eaf2f7fe04e1b4c291155f3fd5ac25 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 13 Dec 2010 17:49:36 +0000 Subject: Fix connecting to ALSA duplex ports. git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@2681 a436a847-0d15-0410-975c-d299462d15a1 --- src/PatchageCanvas.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/PatchageCanvas.cpp b/src/PatchageCanvas.cpp index 99593e0..4f6a12e 100644 --- a/src/PatchageCanvas.cpp +++ b/src/PatchageCanvas.cpp @@ -111,15 +111,12 @@ PatchageCanvas::find_port(const PortID& id) continue; if (pp->type() == ALSA_MIDI) { - /*cerr << "ALSA PORT: " << (int)pp->alsa_addr()->client << ":" - << (int)pp->alsa_addr()->port << endl;*/ - if (pp->alsa_addr() && pp->alsa_addr()->client == id.id.alsa_addr.client && pp->alsa_addr()->port == id.id.alsa_addr.port) { - if (!id.is_input && module->type() == Input) { - //cerr << "WRONG DIRECTION, SKIPPED PORT" << endl; - } else { + if ((module->type() == InputOutput) + || (id.is_input && (module->type() == Input)) + || (!id.is_input && (module->type() == Output))) { return pp; } } -- cgit v1.2.1