while (snd_seq_query_next_port(seq, pinfo) >= 0) {
constexpr int mask = SND_SEQ_PORT_CAP_READ | SND_SEQ_PORT_CAP_SUBS_READ;
if ((snd_seq_port_info_get_capability(pinfo) & mask) == mask) {
while (snd_seq_query_next_port(seq, pinfo) >= 0) {
constexpr int mask = SND_SEQ_PORT_CAP_READ | SND_SEQ_PORT_CAP_SUBS_READ;
if ((snd_seq_port_info_get_capability(pinfo) & mask) == mask) {