diff options
author | David Robillard <d@drobilla.net> | 2014-05-05 14:38:16 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-05-05 14:38:16 +0000 |
commit | 0fe8ea55644ad70bcb10b4b2c840370fdc2339c5 (patch) | |
tree | 1bcf11d6db3ff1530d1e18c099b258388480b6e8 /src/PatchageCanvas.cpp | |
parent | 5336348b38ae02754f043ac0efa6d45ea6cea09b (diff) | |
download | patchage-0fe8ea55644ad70bcb10b4b2c840370fdc2339c5.tar.gz patchage-0fe8ea55644ad70bcb10b4b2c840370fdc2339c5.tar.bz2 patchage-0fe8ea55644ad70bcb10b4b2c840370fdc2339c5.zip |
Support Jack CV and OSC via metadata.
git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@5398 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/PatchageCanvas.cpp')
-rw-r--r-- | src/PatchageCanvas.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
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."); } } |