diff options
author | David Robillard <d@drobilla.net> | 2008-07-10 17:34:29 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-07-10 17:34:29 +0000 |
commit | f7eab5b56d8b77b3e0cd0b42ff5a94aae69942ca (patch) | |
tree | 5183d1d80f6a56b6a35cfb84a962da775e539536 /src/PatchageCanvas.cpp | |
parent | 7e8a156e7580609739408bb31f7415f5319d0e9f (diff) | |
download | patchage-f7eab5b56d8b77b3e0cd0b42ff5a94aae69942ca.tar.gz patchage-f7eab5b56d8b77b3e0cd0b42ff5a94aae69942ca.tar.bz2 patchage-f7eab5b56d8b77b3e0cd0b42ff5a94aae69942ca.zip |
Fix patchage/raul building without jack.
git-svn-id: http://svn.drobilla.net/lad/patchage@1291 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/PatchageCanvas.cpp')
-rw-r--r-- | src/PatchageCanvas.cpp | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/PatchageCanvas.cpp b/src/PatchageCanvas.cpp index 565e703..d88399a 100644 --- a/src/PatchageCanvas.cpp +++ b/src/PatchageCanvas.cpp @@ -67,9 +67,12 @@ PatchageCanvas::find_module(const string& name, ModuleType type) boost::shared_ptr<PatchagePort> PatchageCanvas::find_port(const PatchageEvent::PortRef& ref) { - jack_port_t* jack_port = NULL; string module_name; string port_name; + +#if defined(HAVE_JACK) || defined(HAVE_JACK_DBUS) + jack_port_t* jack_port = NULL; +#endif SharedPtr<PatchageModule> module; boost::shared_ptr<PatchagePort> pp; @@ -141,14 +144,17 @@ PatchageCanvas::connect(boost::shared_ptr<Connectable> port1, boost::shared_ptr< return; if ((p1->type() == JACK_AUDIO && p2->type() == JACK_AUDIO) - || ((p1->type() == JACK_MIDI && p2->type() == JACK_MIDI))) + || ((p1->type() == JACK_MIDI && p2->type() == JACK_MIDI))) { +#if defined(HAVE_JACK) || defined(HAVE_JACK_DBUS) _app->jack_driver()->connect(p1, p2); +#endif #ifdef HAVE_ALSA - else if (p1->type() == ALSA_MIDI && p2->type() == ALSA_MIDI) + } else if (p1->type() == ALSA_MIDI && p2->type() == ALSA_MIDI) { _app->alsa_driver()->connect(p1, p2); #endif - else + } else { status_message("WARNING: Cannot make connection, incompatible port types."); + } } @@ -176,14 +182,17 @@ PatchageCanvas::disconnect(boost::shared_ptr<Connectable> port1, boost::shared_p } if ((input->type() == JACK_AUDIO && output->type() == JACK_AUDIO) - || (input->type() == JACK_MIDI && output->type() == JACK_MIDI)) + || (input->type() == JACK_MIDI && output->type() == JACK_MIDI)) { +#if defined(HAVE_JACK) || 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 && output->type() == ALSA_MIDI) { _app->alsa_driver()->disconnect(output, input); #endif - else + } else { status_message("ERROR: Attempt to disconnect ports with mismatched types"); + } } |