assorted extra debug output for MTC
authorPaul Davis <paul@linuxaudiosystems.com>
Mon, 12 Aug 2013 09:40:11 +0000 (05:40 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 12 Aug 2013 09:40:11 +0000 (05:40 -0400)
libs/ardour/midi_port.cc
libs/ardour/mtc_slave.cc
libs/midi++2/mtc.cc

index 5589c6e501aea0f7ead75d7c37a90c1fdb95beaf..1816ddcb6ff783d8395fdc53058f90cea07d825f 100644 (file)
@@ -71,7 +71,9 @@ MidiPort::get_midi_buffer (pframes_t nframes)
                        /* suck all relevant MIDI events from the MIDI port buffer
                           into our MidiBuffer
                        */
-                       
+
+                       cerr << "grabbing " << event_count << " events\n";
+
                        for (pframes_t i = 0; i < event_count; ++i) {
                                
                                pframes_t timestamp;
index 80d89d621546be450b5c6676697e6ceb703503d3..7f68e54f4bcbe1ba5ea0f40099582f966b202cd8 100644 (file)
@@ -106,6 +106,8 @@ MTC_Slave::process (pframes_t nframes)
 
        /* dump incoming MIDI to parser */
 
+       cerr << "\n\n\n<<<< MTC slave, process " << mb.size() << endl;
+
        for (MidiBuffer::iterator b = mb.begin(); b != mb.end(); ++b) {
                uint8_t* buf = (*b).buffer();
 
@@ -113,11 +115,15 @@ MTC_Slave::process (pframes_t nframes)
 
                uint32_t limit = (*b).size();
 
+               cerr << "msg of " << limit << " bytes\n";
+
                for (size_t n = 0; n < limit; ++n) {
                        parser.scanner (buf[n]);
                }
        }
 
+       cerr << ">>>> MTC slave, done processing\n\n\n";
+
        return 0;
 }
 
@@ -331,7 +337,7 @@ MTC_Slave::update_mtc_time (const byte *msg, bool was_full, framepos_t now)
           a locate command via MMC.
        */
 
-       //DEBUG_TRACE (DEBUG::MTC, string_compose ("MTC::update_mtc_time - TID:%1\n", ::pthread_self()));
+       DEBUG_TRACE (DEBUG::MTC, string_compose ("MTC::update_mtc_time - TID:%1\n", ::pthread_self()));
        TimecodeFormat tc_format;
        bool reset_tc = true;
 
index affe65ec680dae6c5b8bc88beee5d4c4a99ab7e1..57c78cbfb01285577720cfbb2271a10a73cd0561 100644 (file)
@@ -33,7 +33,7 @@ using namespace std;
 using namespace sigc;
 using namespace MIDI;
 
-#undef DEBUG_MTC
+#define DEBUG_MTC
 
 bool
 Parser::possible_mtc (byte *sysex_buf, size_t msglen)
@@ -240,7 +240,7 @@ Parser::process_mtc_quarter_frame (byte *msg)
        /* time code is looking good */
 
 #ifdef DEBUG_MTC
-       // cerr << "for quarter frame " << which_quarter_frame << " byte = " << hex << (int) msg[1] << dec << endl;
+       cerr << "for quarter frame " << which_quarter_frame << " byte = " << hex << (int) msg[1] << dec << endl;
 #endif
 
        switch (which_quarter_frame) {