13
0

LTC remove debug out, delta-time: flywheel display

git-svn-id: svn://localhost/ardour2/branches/3.0@13294 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Robin Gareus 2012-10-16 23:04:02 +00:00
parent 8427901b6a
commit f4ae7cc709

View File

@ -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