diff options
author | David Robillard <d@drobilla.net> | 2007-06-08 02:17:40 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-06-08 02:17:40 +0000 |
commit | c335e2b88b051a1a14b0806ffabb257c2a0d0e74 (patch) | |
tree | b0a024b901f20254b3354cb7bb03f581b435c245 /src/AlsaDriver.cpp | |
parent | 5a2358e39602607757fedd08a7355bede3cb8739 (diff) | |
download | patchage-c335e2b88b051a1a14b0806ffabb257c2a0d0e74.tar.gz patchage-c335e2b88b051a1a14b0806ffabb257c2a0d0e74.tar.bz2 patchage-c335e2b88b051a1a14b0806ffabb257c2a0d0e74.zip |
Monitor/change ALSA connections without refreshing entire canvas (much faster).
Waiting on JACK to provide the notification to do the same....
git-svn-id: http://svn.drobilla.net/lad/patchage@531 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/AlsaDriver.cpp')
-rw-r--r-- | src/AlsaDriver.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/AlsaDriver.cpp b/src/AlsaDriver.cpp index 87ef6d3..9a46d14 100644 --- a/src/AlsaDriver.cpp +++ b/src/AlsaDriver.cpp @@ -87,6 +87,8 @@ AlsaDriver::detach() void AlsaDriver::refresh() { + cerr << "ALSA REFRESH" << endl; + if (!is_attached()) return; @@ -505,6 +507,14 @@ AlsaDriver::_refresh_main() continue; switch (ev->type) { + case SND_SEQ_EVENT_PORT_SUBSCRIBED: + _events.push(PatchageEvent(_app, PatchageEvent::CONNECTION, + ev->data.connect.sender, ev->data.connect.dest)); + break; + case SND_SEQ_EVENT_PORT_UNSUBSCRIBED: + _events.push(PatchageEvent(_app, PatchageEvent::DISCONNECTION, + ev->data.connect.sender, ev->data.connect.dest)); + break; case SND_SEQ_EVENT_RESET: case SND_SEQ_EVENT_CLIENT_START: case SND_SEQ_EVENT_CLIENT_EXIT: @@ -512,9 +522,8 @@ AlsaDriver::_refresh_main() case SND_SEQ_EVENT_PORT_START: case SND_SEQ_EVENT_PORT_EXIT: case SND_SEQ_EVENT_PORT_CHANGE: - case SND_SEQ_EVENT_PORT_SUBSCRIBED: - case SND_SEQ_EVENT_PORT_UNSUBSCRIBED: - _is_dirty = true; + break; + break; default: break; |