diff options
author | Robin Gareus <robin@gareus.org> | 2012-10-16 23:04:02 +0000 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2012-10-16 23:04:02 +0000 |
commit | f4ae7cc709d5c828bbba9bc0ca35ea72d87bb29f (patch) | |
tree | e3933a737b3036c93bdbd126fb8a934ad78fda17 /libs/ardour/ltc_slave.cc | |
parent | 8427901b6aa1ab14773ca41d3f249a7acbf944ba (diff) |
LTC remove debug out, delta-time: flywheel display
git-svn-id: svn://localhost/ardour2/branches/3.0@13294 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ltc_slave.cc')
-rw-r--r-- | libs/ardour/ltc_slave.cc | 11 |
1 files changed, 8 insertions, 3 deletions
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 |