summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-10-05 15:35:06 +0000
committerDavid Robillard <d@drobilla.net>2006-10-05 15:35:06 +0000
commit56e5e5dca5591a6901facb6d1b7a12a04a265de3 (patch)
tree880719f5006daf11dd4f8020c37368b664666d2c /src
parent2c045d093e4cad0ed9f3d98442059cd137d33e0c (diff)
downloadpatchage-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')
-rw-r--r--src/JackDriver.cpp19
-rw-r--r--src/Patchage.cpp4
2 files changed, 16 insertions, 7 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;
diff --git a/src/Patchage.cpp b/src/Patchage.cpp
index e87d431..ace5e24 100644
--- a/src/Patchage.cpp
+++ b/src/Patchage.cpp
@@ -264,6 +264,7 @@ Patchage::status_message(const string& msg)
void
Patchage::attach_menu_items()
{
+#ifdef HAVE_LASH
m_lash_driver->signal_attached.connect(sigc::bind(
sigc::mem_fun(m_menu_lash_launch, &Gtk::MenuItem::set_sensitive), false));
m_lash_driver->signal_attached.connect(sigc::bind(
@@ -277,7 +278,8 @@ Patchage::attach_menu_items()
sigc::mem_fun(m_menu_lash_connect, &Gtk::MenuItem::set_sensitive), true));
m_lash_driver->signal_detached.connect(sigc::bind(
sigc::mem_fun(m_menu_lash_disconnect, &Gtk::MenuItem::set_sensitive), false));
-
+#endif
+
m_jack_driver->signal_attached.connect(sigc::bind(
sigc::mem_fun(m_menu_jack_launch, &Gtk::MenuItem::set_sensitive), false));
m_jack_driver->signal_attached.connect(sigc::bind(