From cbf900d71f762f2656c9f87d1f355013e191065c Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 30 Nov 2009 19:11:04 +0000 Subject: [PATCH] show qtr MTC bytes before they are dispatched as a signal, even more git-svn-id: svn://localhost/ardour2/branches/3.0@6225 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/midi++2/mtc.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/libs/midi++2/mtc.cc b/libs/midi++2/mtc.cc index b737d5e2ac..da85aa11fd 100644 --- a/libs/midi++2/mtc.cc +++ b/libs/midi++2/mtc.cc @@ -90,7 +90,8 @@ Parser::process_mtc_quarter_frame (byte *msg) depending on the direction of the MTC generator ... */ -#if 0 +#define DEBUG_MTC +#ifdef DEBUG_MTC cerr << "MTC: (state = " << _mtc_running << ") " << which_quarter_frame << " vs. " << expected_mtc_quarter_frame_code << " consecutive ? " << consecutive_qtr_frame_cnt @@ -110,16 +111,16 @@ Parser::process_mtc_quarter_frame (byte *msg) last_qtr_frame = which_quarter_frame; consecutive_qtr_frame_cnt++; } - - // cerr << "first seen qframe = " << (int) last_qtr_frame << endl; + + cerr << "first seen qframe = " << (int) last_qtr_frame << endl; return; } else if (consecutive_qtr_frame_cnt == 1) { /* third quarter frame */ - - // cerr << "second seen qframe = " << (int) which_quarter_frame << endl; + + cerr << "second seen qframe = " << (int) which_quarter_frame << endl; if (last_qtr_frame < which_quarter_frame) { _mtc_running = MTC_Forward; @@ -225,6 +226,8 @@ Parser::process_mtc_quarter_frame (byte *msg) /* time code is looking good */ + cerr << "for quarter frame " << which_quarter_frame << " byte = " << hex << (int) msg[1] << dec << endl; + switch (which_quarter_frame) { case 0: // frames LS nibble _qtr_mtc_time[0] |= msg[1] & 0xf;