From 785082b2dad3fa3740038174ffa365b7584ac49a Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sat, 7 Apr 2012 14:48:44 +0000 Subject: [PATCH] debugging mcu via ssl nucleus 2 git-svn-id: svn://localhost/ardour2/branches/3.0@11817 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/surfaces/mackie/mackie_control_protocol.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/libs/surfaces/mackie/mackie_control_protocol.cc b/libs/surfaces/mackie/mackie_control_protocol.cc index 1bd823ae2d..cc7039cffb 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.cc +++ b/libs/surfaces/mackie/mackie_control_protocol.cc @@ -185,14 +185,23 @@ MackiePort& MackieControlProtocol::port_for_id (uint32_t index) { uint32_t current_max = 0; + + cerr << "Looking for port for index " << index << endl; + + for (MackiePorts::iterator it = _ports.begin(); it != _ports.end(); ++it) { + cerr << "\tport " << (*it)->input_port().name() << '/' << (*it)->output_port().name() << " has " << (*it)->strips() << endl; current_max += (*it)->strips(); - if (index < current_max) return **it; + if (index < current_max) { + cerr << "\t\tUSE IT\n"; + return **it; + } } // oops - no matching port ostringstream os; os << "No port for index " << index; + cerr << "No port for index " << index << endl; throw MackieControlException (os.str()); }