Skip to content

Commit b45dae2

Browse files
authored
Merge pull request #323 from rncbc/master
ALSA: Avoid listing ports with SND_SEQ_PORT_CAP_NO_EXPORT (capabilities)
2 parents 1e5b499 + b70cfd8 commit b45dae2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

RtMidi.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2087,7 +2087,9 @@ unsigned int portInfo( snd_seq_t *seq, snd_seq_port_info_t *pinfo, unsigned int
20872087
( ( atyp & SND_SEQ_PORT_TYPE_APPLICATION ) == 0 ) ) continue;
20882088

20892089
unsigned int caps = snd_seq_port_info_get_capability( pinfo );
2090-
if ( ( caps & type ) != type ) continue;
2090+
if ( ( ( caps & type ) != type ) ||
2091+
( ( caps & SND_SEQ_PORT_CAP_NO_EXPORT ) != 0 ) ) continue;
2092+
20912093
if ( count == portNumber ) return 1;
20922094
++count;
20932095
}

0 commit comments

Comments
 (0)