summaryrefslogtreecommitdiffstats
path: root/src/PatchageEvent.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-02-23 18:48:59 +0000
committerDavid Robillard <d@drobilla.net>2008-02-23 18:48:59 +0000
commit52c970b2d32cce2090efbbaaed6ff50de80958df (patch)
tree8e69392e8054c8349ce6dad9a4b4028d08e1ae7c /src/PatchageEvent.hpp
parent8efff32d97b1b578f8c42fe2db7b30cfc44ecf2f (diff)
downloadpatchage-52c970b2d32cce2090efbbaaed6ff50de80958df.tar.gz
patchage-52c970b2d32cce2090efbbaaed6ff50de80958df.tar.bz2
patchage-52c970b2d32cce2090efbbaaed6ff50de80958df.zip
Rearrange event port referencing stuff to make a bit more sense.
git-svn-id: http://svn.drobilla.net/lad/patchage@1159 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/PatchageEvent.hpp')
-rw-r--r--src/PatchageEvent.hpp29
1 files changed, 9 insertions, 20 deletions
diff --git a/src/PatchageEvent.hpp b/src/PatchageEvent.hpp
index 1f15543..e9357ba 100644
--- a/src/PatchageEvent.hpp
+++ b/src/PatchageEvent.hpp
@@ -26,8 +26,6 @@
#include "PatchagePort.hpp"
class Patchage;
-class Driver;
-
/** A Driver event to be processed by the GUI thread.
*/
@@ -44,30 +42,26 @@ public:
DISCONNECTION
};
- PatchageEvent(Driver* d = NULL, Type type=NULL_EVENT)
- : _driver(d)
- , _str(NULL)
+ PatchageEvent(Type type=NULL_EVENT)
+ : _str(NULL)
, _type(type)
{}
- PatchageEvent(Driver* driver, Type type, const char* str)
- : _driver(driver)
- , _str(strdup(str)) // FIXME: not realtime (jack) :(
+ PatchageEvent(Type type, const char* str)
+ : _str(strdup(str)) // FIXME: not realtime (jack) :(
, _type(type)
{}
template <typename P>
- PatchageEvent(Driver* driver, Type type, P port)
- : _driver(driver)
- , _str(NULL)
+ PatchageEvent(Type type, P port)
+ : _str(NULL)
, _port_1(port)
, _type(type)
{}
template <typename P>
- PatchageEvent(Driver* driver, Type type, P port_1, P port_2)
- : _driver(driver)
- , _str(NULL)
+ PatchageEvent(Type type, P port_1, P port_2)
+ : _str(NULL)
, _port_1(port_1, false)
, _port_2(port_2, true)
, _type(type)
@@ -83,9 +77,6 @@ public:
PortRef(jack_port_id_t jack_id, bool ign=false)
: type(JACK_ID) { id.jack_id = jack_id; }
- PortRef(jack_port_t* jack_port, bool ign=false)
- : type(JACK_PORT) { id.jack_port = jack_port; }
-
#ifdef HAVE_ALSA
PortRef(snd_seq_addr_t addr, bool in)
: type(ALSA_ADDR) { id.alsa_addr = addr; is_input = in; }
@@ -93,10 +84,9 @@ public:
bool is_input;
#endif
- enum { NULL_PORT_REF, JACK_ID, JACK_PORT, ALSA_ADDR } type;
+ enum { NULL_PORT_REF, JACK_ID, ALSA_ADDR } type;
union {
- jack_port_t* jack_port;
jack_port_id_t jack_id;
#ifdef HAVE_ALSA
snd_seq_addr_t alsa_addr;
@@ -105,7 +95,6 @@ public:
};
private:
- Driver* _driver;
char* _str;
PortRef _port_1;
PortRef _port_2;