diff options
author | David Robillard <d@drobilla.net> | 2006-10-05 15:35:06 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-10-05 15:35:06 +0000 |
commit | 56e5e5dca5591a6901facb6d1b7a12a04a265de3 (patch) | |
tree | 880719f5006daf11dd4f8020c37368b664666d2c /src/JackDriver.cpp | |
parent | 2c045d093e4cad0ed9f3d98442059cd137d33e0c (diff) | |
download | patchage-56e5e5dca5591a6901facb6d1b7a12a04a265de3.tar.gz patchage-56e5e5dca5591a6901facb6d1b7a12a04a265de3.tar.bz2 patchage-56e5e5dca5591a6901facb6d1b7a12a04a265de3.zip |
Conditional compilation fixes.
git-svn-id: http://svn.drobilla.net/lad/patchage@163 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/JackDriver.cpp')
-rw-r--r-- | src/JackDriver.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/JackDriver.cpp b/src/JackDriver.cpp index 23f53a3..8bfea6f 100644 --- a/src/JackDriver.cpp +++ b/src/JackDriver.cpp @@ -18,6 +18,7 @@ #include <cstring> #include <string> #include <iostream> +#include "config.h" #include <jack/jack.h> #include "PatchageFlowCanvas.h" #include "JackDriver.h" @@ -111,10 +112,13 @@ JackDriver::create_port(boost::shared_ptr<PatchageModule> parent, jack_port_t* p { const char* const type_str = jack_port_type(port); PortType port_type; - if (!strcmp(type_str, JACK_DEFAULT_MIDI_TYPE)) { - port_type = JACK_MIDI; - } else if (!strcmp(type_str, JACK_DEFAULT_AUDIO_TYPE)) { + + if (!strcmp(type_str, JACK_DEFAULT_AUDIO_TYPE)) { port_type = JACK_AUDIO; +#ifdef HAVE_JACK_MIDI + } else if (!strcmp(type_str, JACK_DEFAULT_MIDI_TYPE)) { + port_type = JACK_MIDI; +#endif } else { cerr << "WARNING: " << jack_port_name(port) << " has unknown type \'" << type_str << "\'" << endl; return boost::shared_ptr<PatchagePort>(); @@ -189,10 +193,13 @@ JackDriver::refresh() // FIXME: leak? jack docs don't say const char* const type_str = jack_port_type(port); PortType port_type; - if (!strcmp(type_str, JACK_DEFAULT_MIDI_TYPE)) { - port_type = JACK_MIDI; - } else if (!strcmp(type_str, JACK_DEFAULT_AUDIO_TYPE)) { + + if (!strcmp(type_str, JACK_DEFAULT_AUDIO_TYPE)) { port_type = JACK_AUDIO; +#ifdef HAVE_JACK_MIDI + } else if (!strcmp(type_str, JACK_DEFAULT_MIDI_TYPE)) { + port_type = JACK_MIDI; +#endif } else { cerr << "WARNING: " << ports[i] << " has unknown type \'" << type_str << "\'" << endl; continue; |