diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2011-02-04 19:31:09 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2011-02-04 19:31:09 +0000 |
commit | a0f2932db92471123d7c64fd9aa760b2167a4769 (patch) | |
tree | 724076b3e070548c0ce204dd22ec5668342b0024 /libs | |
parent | 567b0dfd36043d96169d1e3e5c756a016c9d0c4c (diff) |
use PROGRAM_NAME to determine MIDI port to use for Mackie control
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@8710 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r-- | libs/surfaces/mackie/mackie_control_protocol.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libs/surfaces/mackie/mackie_control_protocol.cc b/libs/surfaces/mackie/mackie_control_protocol.cc index 5ba1d641d0..4755f41c41 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.cc +++ b/libs/surfaces/mackie/mackie_control_protocol.cc @@ -622,9 +622,15 @@ MackieControlProtocol::add_port( MIDI::Port & midi_port, int number ) cout << "MIDI::Port::ALSA_Sequencer " << MIDI::Port::ALSA_Sequencer << endl; cout << "MIDI::Port::Unknown " << MIDI::Port::Unknown << endl; #endif - if ( string( midi_port.device() ) == string( "ardour" ) && midi_port.type() == MIDI::Port::ALSA_Sequencer ) + string pname (PROGRAM_NAME); + std::transform(pname.begin(), pname.end(), pname.begin(), ::tolower); + + if ( string( midi_port.device() ) == pname && midi_port.type() == MIDI::Port::ALSA_Sequencer ) { - throw MackieControlException( "The Mackie MCU driver will not use a port with device=ardour" ); + ostringstream s; + s << "The Mackie MCU driver will not use a port with device="; + s << pname; + throw MackieControlException( s.str()); } else if ( midi_port.type() == MIDI::Port::ALSA_Sequencer ) { |