summaryrefslogtreecommitdiffstats
path: root/src/PatchageEvent.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-09-07 20:16:49 +0000
committerDavid Robillard <d@drobilla.net>2008-09-07 20:16:49 +0000
commiteede1a188c2da2c926d49902f2b2c411774342af (patch)
tree6dfa7861c5bf21c1db5175e88249d28027bb16a7 /src/PatchageEvent.hpp
parent19b035f0f0a78d5906664e3080ff467413f20ec2 (diff)
downloadpatchage-eede1a188c2da2c926d49902f2b2c411774342af.tar.gz
patchage-eede1a188c2da2c926d49902f2b2c411774342af.tar.bz2
patchage-eede1a188c2da2c926d49902f2b2c411774342af.zip
Separate PortRef (now PortID) from PatchageEvent.
git-svn-id: http://svn.drobilla.net/lad/patchage@1477 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/PatchageEvent.hpp')
-rw-r--r--src/PatchageEvent.hpp32
1 files changed, 3 insertions, 29 deletions
diff --git a/src/PatchageEvent.hpp b/src/PatchageEvent.hpp
index 4167146..4f39dd3 100644
--- a/src/PatchageEvent.hpp
+++ b/src/PatchageEvent.hpp
@@ -27,6 +27,7 @@
#include <alsa/asoundlib.h>
#endif
#include "PatchagePort.hpp"
+#include "PortID.hpp"
class Patchage;
@@ -74,37 +75,10 @@ public:
inline Type type() const { return (Type)_type; }
- struct PortRef {
- PortRef() : type(NULL_PORT_REF) { memset(&id, 0, sizeof(id)); }
-
-#ifdef HAVE_JACK
- PortRef(jack_port_id_t jack_id, bool ign=false)
- : type(JACK_ID) { id.jack_id = jack_id; }
-#endif
-
-#ifdef HAVE_ALSA
- PortRef(snd_seq_addr_t addr, bool in)
- : type(ALSA_ADDR) { id.alsa_addr = addr; is_input = in; }
-
- bool is_input;
-#endif
-
- enum { NULL_PORT_REF, JACK_ID, ALSA_ADDR } type;
-
- union {
-#ifdef HAVE_JACK
- jack_port_id_t jack_id;
-#endif
-#ifdef HAVE_ALSA
- snd_seq_addr_t alsa_addr;
-#endif
- } id;
- };
-
private:
char* _str;
- PortRef _port_1;
- PortRef _port_2;
+ PortID _port_1;
+ PortID _port_2;
uint8_t _type;
};