diff options
author | David Robillard <d@drobilla.net> | 2011-06-09 00:23:26 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-06-09 00:23:26 +0000 |
commit | 91cdc941af88e8ba6e19673eb17825233db2218c (patch) | |
tree | fb98fc700eb745a6dee1c8bae0e281e07256965a /src/AlsaDriver.hpp | |
parent | 69b9029a052e9d9c0d66e4b2fe954f9a6e906a92 (diff) | |
download | patchage-91cdc941af88e8ba6e19673eb17825233db2218c.tar.gz patchage-91cdc941af88e8ba6e19673eb17825233db2218c.tar.bz2 patchage-91cdc941af88e8ba6e19673eb17825233db2218c.zip |
Fix support for multiple instances of alsa clients with the same name (never consider client name an ID).
Remove Alsa specific crap from PatchagePort.
Sane implementation of AlsaDriver::refresh.
Fix refreshing.
Remove useless Jack graph order callback.
Fix double add/remove of ports to modules.
git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@3374 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/AlsaDriver.hpp')
-rw-r--r-- | src/AlsaDriver.hpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/AlsaDriver.hpp b/src/AlsaDriver.hpp index 54c35b1..8279273 100644 --- a/src/AlsaDriver.hpp +++ b/src/AlsaDriver.hpp @@ -21,12 +21,14 @@ #include <queue> #include <set> #include <string> +#include <map> #include <alsa/asoundlib.h> #include <pthread.h> #include "Driver.hpp" #include "PatchageModule.hpp" + class Patchage; class PatchagePort; @@ -61,18 +63,16 @@ public: void process_events(Patchage* app); private: - void refresh_ports(); - void refresh_connections(); - - void add_connections(PatchagePort* port); - bool create_refresh_port(); static void* refresh_main(void* me); void _refresh_main(); + PatchageModule* find_module(uint8_t client_id, ModuleType type); + PatchageModule* find_or_create_module( Patchage* patchage, + uint8_t client_id, const std::string& client_name, ModuleType type); @@ -105,6 +105,12 @@ private: typedef std::set<snd_seq_addr_t, SeqAddrComparator> Ignored; Ignored _ignored; + typedef std::multimap<uint8_t, PatchageModule*> Modules; + Modules _modules; + + typedef std::map<PatchagePort*, PortID> PortAddrs; + PortAddrs _port_addrs; + bool ignore(const snd_seq_addr_t& addr, bool add=true); }; |