From 4ac8e622bb4ef5841435fc0815efb6bb756f76da Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 28 Nov 2020 11:18:08 +0100 Subject: 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. --- src/PatchageEvent.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/PatchageEvent.cpp') 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 } -- cgit v1.2.1