From f4ae7cc709d5c828bbba9bc0ca35ea72d87bb29f Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 16 Oct 2012 23:04:02 +0000 Subject: LTC remove debug out, delta-time: flywheel display git-svn-id: svn://localhost/ardour2/branches/3.0@13294 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/ltc_slave.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'libs/ardour/ltc_slave.cc') diff --git a/libs/ardour/ltc_slave.cc b/libs/ardour/ltc_slave.cc index 7ff3aa1659..0e4f50b55a 100644 --- a/libs/ardour/ltc_slave.cc +++ b/libs/ardour/ltc_slave.cc @@ -225,7 +225,7 @@ LTC_Slave::detect_ltc_discontinuity(LTCFrameExt *frame) { /* notfify about discontinuities */ if (frames_in_sequence > 0 && discontinuity_detected) { - fprintf(stdout, "# LTC DISCONTINUITY\n"); + DEBUG_TRACE (DEBUG::LTC, "# LTC DISCONTINUITY\n"); frames_in_sequence=0; return true; } @@ -271,7 +271,6 @@ LTC_Slave::process_ltc(framepos_t const now, framepos_t const sess_pos, framecnt if (frames_in_sequence < 1) { fprintf(stdout, " ####### FIRST LTC FRAME in SEQ #######\n"); - continue; } if (ltc_discontinuity) { @@ -279,6 +278,10 @@ LTC_Slave::process_ltc(framepos_t const now, framepos_t const sess_pos, framecnt } #endif + if (frames_in_sequence < 1) { + continue; + } + /* when a full LTC frame is decoded, the timecode the LTC frame * is referring has just passed. * So we send the _next_ timecode which @@ -545,8 +548,10 @@ std::string LTC_Slave::approximate_current_delta() const { char delta[24]; - if (last_timestamp == 0 || frames_in_sequence < 3) { + if (last_timestamp == 0 || frames_in_sequence < 2) { snprintf(delta, sizeof(delta), "---"); + } else if ((monotonic_cnt - last_timestamp) > 2 * frames_per_ltc_frame) { + snprintf(delta, sizeof(delta), "flywheel"); } else { // TODO if current_delta > 1 frame -> display timecode. // delta >0 if A3's transport is _behind_ LTC -- cgit v1.2.3