summaryrefslogtreecommitdiffstats
path: root/src/PatchageEvent.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-11-28 11:18:08 +0100
committerDavid Robillard <d@drobilla.net>2020-11-28 12:45:57 +0100
commit4ac8e622bb4ef5841435fc0815efb6bb756f76da (patch)
tree156fed5580687bca59fed337c9701acbcaf469f5 /src/PatchageEvent.cpp
parent4988d75f19e81c58e2cfdc068c5638b95ae9e314 (diff)
downloadpatchage-4ac8e622bb4ef5841435fc0815efb6bb756f76da.tar.gz
patchage-4ac8e622bb4ef5841435fc0815efb6bb756f76da.tar.bz2
patchage-4ac8e622bb4ef5841435fc0815efb6bb756f76da.zip
Always index Jack ports and refer to them by name
The Jack API annoyingly doesn't provide a way to get an ID from a port name. Since notification callbacks apparently don't have to worry about realtime concerns anymore, simply use the full name string as an ID everywhere. This means that every Jack port has a non-null ID, and all ports are always indexed, so the kludges for this in the canvas can be removed.
Diffstat (limited to 'src/PatchageEvent.cpp')
-rw-r--r--src/PatchageEvent.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/PatchageEvent.cpp b/src/PatchageEvent.cpp
index ce9cd48..abff4b8 100644
--- a/src/PatchageEvent.cpp
+++ b/src/PatchageEvent.cpp
@@ -56,12 +56,12 @@ PatchageEvent::execute(Patchage* patchage)
} else if (_type == Type::port_creation) {
Driver* driver = nullptr;
- if (_port_1.type == PortID::Type::jack_id) {
+ if (_port_1.type() == PortID::Type::jack) {
#if defined(PATCHAGE_LIBJACK) || defined(HAVE_JACK_DBUS)
driver = patchage->jack_driver();
#endif
#ifdef HAVE_ALSA
- } else if (_port_1.type == PortID::Type::alsa_addr) {
+ } else if (_port_1.type() == PortID::Type::alsa) {
driver = patchage->alsa_driver();
#endif
}