summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Scavone <gary@music.mcgill.ca>2015-01-08 11:49:37 -0500
committerGary Scavone <gary@music.mcgill.ca>2015-01-08 11:49:37 -0500
commit28321c051ed849b0fbd1f7b1aaee19b8ca807390 (patch)
tree41f9e651485567a7f8e4b2d9fcace1ad1d38a78a
parent1690808587a5378004fd0562b0e36934ae46c5f3 (diff)
Update to ALSA port type search.
-rw-r--r--RtMidi.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/RtMidi.cpp b/RtMidi.cpp
index cb3fa02..ce6db63 100644
--- a/RtMidi.cpp
+++ b/RtMidi.cpp
@@ -1385,7 +1385,8 @@ unsigned int portInfo( snd_seq_t *seq, snd_seq_port_info_t *pinfo, unsigned int
snd_seq_port_info_set_port( pinfo, -1 );
while ( snd_seq_query_next_port( seq, pinfo ) >= 0 ) {
unsigned int atyp = snd_seq_port_info_get_type( pinfo );
- if ( ( atyp & SND_SEQ_PORT_TYPE_MIDI_GENERIC ) == 0 ) continue;
+ if ( ( ( atyp & SND_SEQ_PORT_TYPE_MIDI_GENERIC ) == 0 ) &&
+ ( ( atyp & SND_SEQ_PORT_TYPE_SYNTH ) == 0 ) ) continue;
unsigned int caps = snd_seq_port_info_get_capability( pinfo );
if ( ( caps & type ) != type ) continue;
if ( count == portNumber ) return 1;