diff options
author | Carl Hetherington <carl@carlh.net> | 2010-07-07 00:40:58 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-07-07 00:40:58 +0000 |
commit | ea23298f10e9587eba483cb54a6f7d75ca68126a (patch) | |
tree | bdd396ac05d0be01cbbcc6447844a04814e79cbf /libs/surfaces/mackie/interface.cc | |
parent | 6cccf3ce7dc86998d6797f393bec5b69610fc5f3 (diff) |
Setup fixed ports for MIDI control data; hence remove configuration of those ports. Move MIDI tracer to the Windows menu. Trim some unused code from the midi++ Manager.
git-svn-id: svn://localhost/ardour2/branches/3.0@7384 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/surfaces/mackie/interface.cc')
-rw-r--r-- | libs/surfaces/mackie/interface.cc | 39 |
1 files changed, 11 insertions, 28 deletions
diff --git a/libs/surfaces/mackie/interface.cc b/libs/surfaces/mackie/interface.cc index 067941484c..d3625cac51 100644 --- a/libs/surfaces/mackie/interface.cc +++ b/libs/surfaces/mackie/interface.cc @@ -31,36 +31,19 @@ using namespace std; ControlProtocol* new_mackie_protocol (ControlProtocolDescriptor*, Session* s) { - if ( Config->get_mmc_port_name().substr(0,3) == "mcu" ) - { - error << "mcu already used as mmc port" << endmsg; - } - else if ( Config->get_mtc_port_name().substr(0,3) == "mcu" ) - { - error << "mcu already used as mtc port" << endmsg; - } - else if ( Config->get_midi_port_name().substr(0,3) == "mcu" ) - { - error << "mcu already used as midi port" << endmsg; + MackieControlProtocol* mcp = 0; + + try { + mcp = new MackieControlProtocol (*s); + mcp->set_active (true); } - else - { - // no one else is using the port, so try instantiate the object - MackieControlProtocol * mcp = 0; - try - { - mcp = new MackieControlProtocol (*s); - mcp->set_active( true ); - } - catch( exception & e ) - { - error << "Error instantiating MackieControlProtocol: " << e.what() << endmsg; - delete mcp; - mcp = 0; - } - return mcp; + catch (exception & e) { + error << "Error instantiating MackieControlProtocol: " << e.what() << endmsg; + delete mcp; + mcp = 0; } - return 0; + + return mcp; } void |