diff options
author | David Robillard <d@drobilla.net> | 2006-11-11 01:00:47 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-11-11 01:00:47 +0000 |
commit | 9ed6efc808cb57555f89f08475df70fd4f8b630b (patch) | |
tree | 5486ef7e97a6978f985b433e1966f76a03501845 /src/PatchagePort.h | |
parent | 5b83af28b6eeb52a285618cd90f30a5461189efd (diff) | |
download | patchage-9ed6efc808cb57555f89f08475df70fd4f8b630b.tar.gz patchage-9ed6efc808cb57555f89f08475df70fd4f8b630b.tar.bz2 patchage-9ed6efc808cb57555f89f08475df70fd4f8b630b.zip |
Fixes for building without ALSA (eg on OSX)
git-svn-id: http://svn.drobilla.net/lad/patchage@200 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/PatchagePort.h')
-rw-r--r-- | src/PatchagePort.h | 13 |
1 files changed, 11 insertions, 2 deletions
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 <string> #include <list> -#include <alsa/asoundlib.h> #include <flowcanvas/Port.h> #include <flowcanvas/Module.h> #include <boost/shared_ptr.hpp> +#ifdef HAVE_ALSA +#include <alsa/asoundlib.h> +#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; }; |