summaryrefslogtreecommitdiffstats
path: root/src/ClientID.hpp
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/ClientID.hpp
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/ClientID.hpp')
-rw-r--r--src/ClientID.hpp4
1 files changed, 2 insertions, 2 deletions
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
};