summaryrefslogtreecommitdiff
path: root/libs/midi++2/mtc.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2009-11-30 19:11:04 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2009-11-30 19:11:04 +0000
commitcbf900d71f762f2656c9f87d1f355013e191065c (patch)
tree20f33296a944e11b7aa869419c406adcae9d4c7a /libs/midi++2/mtc.cc
parentd1a75f494f039efc6741f00949feef96c5f9c6a0 (diff)
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
Diffstat (limited to 'libs/midi++2/mtc.cc')
-rw-r--r--libs/midi++2/mtc.cc13
1 files 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;