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/ClientID.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ClientID.hpp') diff --git a/src/ClientID.hpp b/src/ClientID.hpp index 665c237..d58c5ee 100644 --- a/src/ClientID.hpp +++ b/src/ClientID.hpp @@ -61,14 +61,14 @@ private: assert(_type == Type::jack); } - ClientID(const Type type, uint8_t alsa_id) + ClientID(const Type type, const uint8_t alsa_id) : _type{type} , _alsa_id{alsa_id} { assert(_type == Type::alsa); } - Type _type; ///< Type that determines which field is active + Type _type; ///< Determines which field is active std::string _jack_name{}; ///< Client name for Type::jack uint8_t _alsa_id{}; ///< Client ID for Type::alsa }; -- cgit v1.2.1