From 91cdc941af88e8ba6e19673eb17825233db2218c Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 9 Jun 2011 00:23:26 +0000 Subject: 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 --- src/AlsaDriver.hpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src/AlsaDriver.hpp') 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 #include #include +#include #include #include #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 Ignored; Ignored _ignored; + typedef std::multimap Modules; + Modules _modules; + + typedef std::map PortAddrs; + PortAddrs _port_addrs; + bool ignore(const snd_seq_addr_t& addr, bool add=true); }; -- cgit v1.2.1