summaryrefslogtreecommitdiffstats
path: root/src/AlsaDriver.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-12-19 22:22:24 +0000
committerDavid Robillard <d@drobilla.net>2007-12-19 22:22:24 +0000
commit507ddc607504f0629e9cc110fa1a6b1c28477f85 (patch)
tree774b9ff95e7cc523cd6dc3991287f912fc9294fe /src/AlsaDriver.cpp
parent91377650b8a8fdea5ff83ffd97181a96c5ff6ac4 (diff)
downloadpatchage-507ddc607504f0629e9cc110fa1a6b1c28477f85.tar.gz
patchage-507ddc607504f0629e9cc110fa1a6b1c28477f85.tar.bz2
patchage-507ddc607504f0629e9cc110fa1a6b1c28477f85.zip
Fix some ALSA clients/ports not showing up.
git-svn-id: http://svn.drobilla.net/lad/patchage@983 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/AlsaDriver.cpp')
-rw-r--r--src/AlsaDriver.cpp29
1 files changed, 12 insertions, 17 deletions
diff --git a/src/AlsaDriver.cpp b/src/AlsaDriver.cpp
index 115524d..d42cd7c 100644
--- a/src/AlsaDriver.cpp
+++ b/src/AlsaDriver.cpp
@@ -142,7 +142,7 @@ AlsaDriver::refresh_ports()
while (snd_seq_query_next_port(_seq, pinfo) >= 0) {
int caps = snd_seq_port_info_get_capability(pinfo);
int type = snd_seq_port_info_get_type(pinfo);
-
+
// Skip ports we shouldn't show
if (caps & SND_SEQ_PORT_CAP_NO_EXPORT)
continue;
@@ -174,8 +174,10 @@ AlsaDriver::refresh_ports()
bool split = _app->state_manager()->get_module_split(client_name, !is_application)
|| is_duplex;
- //cout << client_name << " : " << port_name << " is_application = " << is_application
- // << " is_duplex = " << is_duplex << ", split = " << split << endl;
+ //cout << "SHOW: " << client_name << " : " << port_name
+ //<< " is_application = " << is_application
+ //<< " is_duplex = " << is_duplex
+ //<< ", split = " << split << endl;
// Application input/output ports go on the same module
if (!split) {
@@ -184,6 +186,7 @@ AlsaDriver::refresh_ports()
m = boost::shared_ptr<PatchageModule>(new PatchageModule(_app, client_name, InputOutput));
m->load_location();
m->store_location();
+ _app->canvas()->add_item(m);
}
if (!m->get_port(port_name)) {
@@ -217,6 +220,7 @@ AlsaDriver::refresh_ports()
new PatchageModule(_app, client_name, type));
m->load_location();
m->store_location();
+ _app->canvas()->add_item(m);
}
if (!m->get_port(port_name)) {
@@ -525,12 +529,6 @@ AlsaDriver::_refresh_main()
switch (ev->type) {
case SND_SEQ_EVENT_PORT_SUBSCRIBED:
- /*cout << "Subscription: ";
- print_addr(ev->data.connect.sender);
- cout << " -> ";
- print_addr(ev->data.connect.dest);
- cout << endl;*/
-
_events.push(PatchageEvent(PatchageEvent::CONNECTION,
ev->data.connect.sender, ev->data.connect.dest));
break;
@@ -538,18 +536,15 @@ AlsaDriver::_refresh_main()
_events.push(PatchageEvent(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:
- case SND_SEQ_EVENT_CLIENT_CHANGE:
case SND_SEQ_EVENT_PORT_START:
case SND_SEQ_EVENT_PORT_EXIT:
case SND_SEQ_EVENT_PORT_CHANGE:
- break;
-
- break;
+ case SND_SEQ_EVENT_CLIENT_START:
+ case SND_SEQ_EVENT_CLIENT_EXIT:
+ case SND_SEQ_EVENT_CLIENT_CHANGE:
+ case SND_SEQ_EVENT_RESET:
default:
- break;
+ cout << "Unknown ALSA event: " << (int)ev->type << endl;
}
}
}