From 9ed6efc808cb57555f89f08475df70fd4f8b630b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 11 Nov 2006 01:00:47 +0000 Subject: Fixes for building without ALSA (eg on OSX) git-svn-id: http://svn.drobilla.net/lad/patchage@200 a436a847-0d15-0410-975c-d299462d15a1 --- src/PatchagePort.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/PatchagePort.h') diff --git a/src/PatchagePort.h b/src/PatchagePort.h index ec069a3..13c51a8 100644 --- a/src/PatchagePort.h +++ b/src/PatchagePort.h @@ -17,13 +17,17 @@ #ifndef PATCHAGEPORT_H #define PATCHAGEPORT_H +#include "config.h" #include #include -#include #include #include #include +#ifdef HAVE_ALSA +#include +#endif + using namespace LibFlowCanvas; using std::string; using std::list; @@ -41,24 +45,29 @@ public: : Port(module, name, is_input, color), m_type(type) { +#ifdef HAVE_ALSA m_alsa_addr.client = '\0'; m_alsa_addr.port = '\0'; +#endif } virtual ~PatchagePort() {} +#ifdef HAVE_ALSA // FIXME: This driver specific crap really needs to go void alsa_addr(const snd_seq_addr_t addr) { m_alsa_addr = addr; } const snd_seq_addr_t* alsa_addr() const { return (m_type == ALSA_MIDI) ? &m_alsa_addr : NULL; } - +#endif /** Returns the full name of this port, as "modulename:portname" */ string full_name() const { return m_module.lock()->name() + ":" + m_name; } PortType type() const { return m_type; } private: +#ifdef HAVE_ALSA snd_seq_addr_t m_alsa_addr; +#endif PortType m_type; }; -- cgit v1.2.1