diff options
Diffstat (limited to 'src/PatchageEvent.hpp')
-rw-r--r-- | src/PatchageEvent.hpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/PatchageEvent.hpp b/src/PatchageEvent.hpp index ada4718..19cf16d 100644 --- a/src/PatchageEvent.hpp +++ b/src/PatchageEvent.hpp @@ -25,6 +25,9 @@ #endif #include "PatchagePort.hpp" +#include <iostream> +using namespace std; + class Patchage; @@ -58,8 +61,8 @@ public: #ifdef HAVE_ALSA PatchageEvent(Type type, snd_seq_addr_t port_1, snd_seq_addr_t port_2) : _type(type) - , _port_1(port_1) - , _port_2(port_2) + , _port_1(port_1, false) + , _port_2(port_2, true) {} #endif @@ -71,13 +74,14 @@ private: uint8_t _type; struct PortRef { - PortRef() : type(NULL_PORT_REF) { id.jack_id = 0; } + PortRef() : type(NULL_PORT_REF) { memset(&id, 0, sizeof(id)); } PortRef(jack_port_id_t jack_id) : type(JACK_ID) { id.jack_id = jack_id; } PortRef(jack_port_t* jack_port) : type(JACK_PORT) { id.jack_port = jack_port; } #ifdef HAVE_ALSA - PortRef(snd_seq_addr_t addr) : type(ALSA_ADDR) { id.alsa_addr = addr; } + PortRef(snd_seq_addr_t addr, bool input) : type(ALSA_ADDR) + { id.alsa_addr = addr; is_input = input; } #endif enum { NULL_PORT_REF, JACK_ID, JACK_PORT, ALSA_ADDR } type; @@ -89,6 +93,11 @@ private: snd_seq_addr_t alsa_addr; #endif } id; + +#ifdef HAVE_ALSA + bool is_input; +#endif + }; PortRef _port_1; |