debugging mcu via ssl nucleus 2
authorPaul Davis <paul@linuxaudiosystems.com>
Sat, 7 Apr 2012 14:48:44 +0000 (14:48 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Sat, 7 Apr 2012 14:48:44 +0000 (14:48 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@11817 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/surfaces/mackie/mackie_control_protocol.cc

index 1bd823ae2de6c23ca57e420754bc8ed423bf3e00..cc7039cffbc435fcef2c8f9672cd79879554185f 100644 (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());
 }