Conditional compilation fixes.
git-svn-id: http://svn.drobilla.net/lad/patchage@163 a436a847-0d15-0410-975c-d299462d15a1
This commit is contained in:
parent
64a28e7b3a
commit
fc7faf0da3
|
@ -24,6 +24,15 @@ PKG_CHECK_MODULES(FLOWCANVAS, flowcanvas >= 0.1.0)
|
|||
# Check for Jack
|
||||
PKG_CHECK_MODULES(JACK, jack >= 0.100.0)
|
||||
|
||||
# Jack MIDI
|
||||
build_jack_midi="yes"
|
||||
AC_ARG_ENABLE(jack_midi,
|
||||
[AS_HELP_STRING(--enable-jack-midi, [Enable Jack MIDI support (yes)])],
|
||||
[ if test x$enable_jack_midi = xno ; then build_jack_midi=no ; fi ])
|
||||
if test "$build_jack_midi" = "yes"; then
|
||||
AC_DEFINE(HAVE_JACK_MIDI, 1, [whether or not we have Jack MIDI])
|
||||
fi
|
||||
|
||||
# Check for ALSA
|
||||
enable_alsa="yes"
|
||||
AC_ARG_ENABLE(alsa,
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue