From c7ed35bcab46fae05c77a68c54f9b46701ebb96e Mon Sep 17 00:00:00 2001 From: aib Date: Sun, 18 Sep 2016 13:54:00 +0300 Subject: [PATCH] Return actual port names in getPortName when using ALSA --- RtMidi.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RtMidi.cpp b/RtMidi.cpp index 6809b333..7feaec45 100644 --- a/RtMidi.cpp +++ b/RtMidi.cpp @@ -1445,6 +1445,8 @@ std::string MidiInAlsa :: getPortName( unsigned int portNumber ) snd_seq_get_any_client_info( data->seq, cnum, cinfo ); std::ostringstream os; os << snd_seq_client_info_get_name( cinfo ); + os << ":"; + os << snd_seq_port_info_get_name( pinfo ); os << " "; // These lines added to make sure devices are listed os << snd_seq_port_info_get_client( pinfo ); // with full portnames added to ensure individual device names os << ":"; @@ -1744,6 +1746,8 @@ std::string MidiOutAlsa :: getPortName( unsigned int portNumber ) snd_seq_get_any_client_info( data->seq, cnum, cinfo ); std::ostringstream os; os << snd_seq_client_info_get_name(cinfo); + os << ":"; + os << snd_seq_port_info_get_name( pinfo ); os << " "; // These lines added to make sure devices are listed os << snd_seq_port_info_get_client( pinfo ); // with full portnames added to ensure individual device names os << ":";