13
0

debugging mcu via ssl nucleus 2

git-svn-id: svn://localhost/ardour2/branches/3.0@11817 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2012-04-07 14:48:44 +00:00
parent 1f26ba1688
commit 785082b2da

View File

@ -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());
}