diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-04-10 14:45:21 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-04-10 14:45:21 +0000 |
commit | 12357ec4bb3a3219cb75664fdded988febee9447 (patch) | |
tree | 5dd15fdf64ded988e0aa43ba906e426e7f612c0b /libs/surfaces | |
parent | fb4816f0100ad85c388f20ef9cc7047710403f09 (diff) |
MCP: more debug tracing
git-svn-id: svn://localhost/ardour2/branches/3.0@11863 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/surfaces')
-rw-r--r-- | libs/surfaces/mackie/surface.cc | 3 | ||||
-rw-r--r-- | libs/surfaces/mackie/surface_port.cc | 13 |
2 files changed, 6 insertions, 10 deletions
diff --git a/libs/surfaces/mackie/surface.cc b/libs/surfaces/mackie/surface.cc index dda453087d..971934c2d9 100644 --- a/libs/surfaces/mackie/surface.cc +++ b/libs/surfaces/mackie/surface.cc @@ -306,6 +306,9 @@ Surface::connect_to_signals () { if (!_connected) { + DEBUG_TRACE (DEBUG::MackieControl, string_compose ("Surface %1 connecting to signals on port %2\n", + number(), _port->input_port().name())); + MIDI::Parser* p = _port->input_port().parser(); /* V-Pot messages are Controller */ diff --git a/libs/surfaces/mackie/surface_port.cc b/libs/surfaces/mackie/surface_port.cc index 5fcea4c98f..d35c15da3f 100644 --- a/libs/surfaces/mackie/surface_port.cc +++ b/libs/surfaces/mackie/surface_port.cc @@ -126,16 +126,12 @@ void SurfacePort::write (const MidiByteArray & mba) return; } -#ifdef PORT_DEBUG - cout << "SurfacePort::write: " << mba << " to " << output_port().name() << endl; -#endif - - // check active before and after lock - to make sure - // that the destructor doesn't destroy the mutex while - // it's still in use if (!active()) return; + DEBUG_TRACE (DEBUG::MackieControl, string_compose ("port %1 write %2\n", output_port().name(), mba)); + int count = output_port().write (mba.bytes().get(), mba.size(), 0); + if (count != (int)mba.size()) { if (errno == 0) { cout << "port overflow on " << output_port().name() << ". Did not write all of " << mba << endl; @@ -148,9 +144,6 @@ void SurfacePort::write (const MidiByteArray & mba) inactive_event(); } } -#ifdef PORT_DEBUG - cout << "SurfacePort::wrote " << count << endl; -#endif } |