From 0fe8ea55644ad70bcb10b4b2c840370fdc2339c5 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 5 May 2014 14:38:16 +0000 Subject: Support Jack CV and OSC via metadata. git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@5398 a436a847-0d15-0410-975c-d299462d15a1 --- src/PatchageCanvas.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/PatchageCanvas.cpp') diff --git a/src/PatchageCanvas.cpp b/src/PatchageCanvas.cpp index cbee58b..7a9cacc 100644 --- a/src/PatchageCanvas.cpp +++ b/src/PatchageCanvas.cpp @@ -215,8 +215,11 @@ PatchageCanvas::connect(Ganv::Node* port1, if (!p1 || !p2) return; - if ((p1->type() == JACK_AUDIO && p2->type() == JACK_AUDIO) - || ((p1->type() == JACK_MIDI && p2->type() == JACK_MIDI))) { + if ((p1->type() == JACK_AUDIO && p2->type() == JACK_AUDIO) || + (p1->type() == JACK_MIDI && p2->type() == JACK_MIDI) | + (p1->type() == JACK_AUDIO && p2->type() == JACK_CV) || + (p1->type() == JACK_CV && p2->type() == JACK_CV) || + (p1->type() == JACK_OSC && p2->type() == JACK_OSC)) { #if defined(PATCHAGE_LIBJACK) || defined(HAVE_JACK_DBUS) _app->jack_driver()->connect(p1, p2); #endif @@ -250,17 +253,19 @@ PatchageCanvas::disconnect(Ganv::Node* port1, return; } - if ((input->type() == JACK_AUDIO && output->type() == JACK_AUDIO) - || (input->type() == JACK_MIDI && output->type() == JACK_MIDI)) { + if (input->type() == JACK_AUDIO || + input->type() == JACK_MIDI || + input->type() == JACK_CV || + input->type() == JACK_OSC) { #if defined(PATCHAGE_LIBJACK) || defined(HAVE_JACK_DBUS) _app->jack_driver()->disconnect(output, input); #endif #ifdef HAVE_ALSA - } else if (input->type() == ALSA_MIDI && output->type() == ALSA_MIDI) { + } else if (input->type() == ALSA_MIDI) { _app->alsa_driver()->disconnect(output, input); #endif } else { - _app->error_msg("Attempt to disconnect ports with mismatched types."); + _app->error_msg("Attempt to disconnect ports with strange types."); } } -- cgit v1.2.1