summaryrefslogtreecommitdiffstats
path: root/src/AlsaDriver.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-12-15 01:39:31 +0000
committerDavid Robillard <d@drobilla.net>2010-12-15 01:39:31 +0000
commit9e117275efe6585e2039130a5729bd75c120706e (patch)
treef47ec4f30c6c86b8f4b324eb4bcc3cb465dffe8a /src/AlsaDriver.hpp
parentba2863f012866398efab12b6b3e6a113d5eb60bd (diff)
downloadpatchage-9e117275efe6585e2039130a5729bd75c120706e.tar.gz
patchage-9e117275efe6585e2039130a5729bd75c120706e.tar.bz2
patchage-9e117275efe6585e2039130a5729bd75c120706e.zip
Fix previous commit's failed attempt to ignore ports (sane ALSA driver).
git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@2691 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/AlsaDriver.hpp')
-rw-r--r--src/AlsaDriver.hpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/AlsaDriver.hpp b/src/AlsaDriver.hpp
index 23d635f..662d8ae 100644
--- a/src/AlsaDriver.hpp
+++ b/src/AlsaDriver.hpp
@@ -18,8 +18,9 @@
#ifndef PATCHAGE_ALSADRIVER_HPP
#define PATCHAGE_ALSADRIVER_HPP
-#include <string>
#include <queue>
+#include <set>
+#include <string>
#include <alsa/asoundlib.h>
#include <pthread.h>
@@ -93,6 +94,17 @@ private:
Glib::Mutex _events_mutex;
std::queue<PatchageEvent> _events;
+
+ struct SeqAddrComparator {
+ bool operator() (const snd_seq_addr_t& a, const snd_seq_addr_t& b) const {
+ return ((a.client < b.client) || ((a.client == b.client) && a.port < b.port));
+ }
+ };
+
+ typedef std::set<snd_seq_addr_t, SeqAddrComparator> Ignored;
+ Ignored _ignored;
+
+ bool ignore(const snd_seq_addr_t& addr, bool add=true);
};
#endif // PATCHAGE_ALSADRIVER_HPP