summaryrefslogtreecommitdiff
path: root/libs/ardour/session_ltc.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2012-11-05 22:55:13 +0000
committerRobin Gareus <robin@gareus.org>2012-11-05 22:55:13 +0000
commitb75a348e3a0f0d2493f675c4aa398cd8e6b9d1c2 (patch)
tree983216693aee98db283b62d840e0102a90db596c /libs/ardour/session_ltc.cc
parent6035b92036f17745052702df1a275567063f6f24 (diff)
NOOP - LTC generator: bit-alignment add comments and made permanent
git-svn-id: svn://localhost/ardour2/branches/3.0@13388 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_ltc.cc')
-rw-r--r--libs/ardour/session_ltc.cc26
1 files changed, 14 insertions, 12 deletions
diff --git a/libs/ardour/session_ltc.cc b/libs/ardour/session_ltc.cc
index 35b175e531..94d7d6de21 100644
--- a/libs/ardour/session_ltc.cc
+++ b/libs/ardour/session_ltc.cc
@@ -479,24 +479,26 @@ Session::ltc_tx_send_time_code_for_cycle (framepos_t start_frame, framepos_t end
DEBUG_TRACE (DEBUG::LTC, string_compose("LTC TX5 restart @ %1 + %2 - %3 | byte %4\n",
ltc_enc_pos, ltc_enc_cnt, cyc_off, ltc_enc_byte));
}
-#if 1 /* experimental sample bit alignment */
else if (ltc_speed != 0 && (fptcf / ltc_speed / 80) > 3 ) {
- /* We may get away without a DLL if speed-changes are uniform enough and
- * no oscillation takes place, the linear approx here should reduce the
- * jitter sufficiently when generating LTC from another LTC source or
- * JACK-transport or ardour internal clock.
- *
- * Note that the granularity of the LTC encoder speed is 1 byte =
+ /* reduce (low freq) jitter.
+ * The granularity of the LTC encoder speed is 1 byte =
* (frames-per-timecode-frame / 10) audio-samples.
+ * Thus, tiny speed changes [as produced by the slave]
+ * may not have any effect in the cycle when they occur,
+ * but they will add up over time.
+ *
+ * This is a linear approx to compensate for this drift
+ * and prempt re-sync when the drift builds up.
*
- * Thus, tiny speed changes won't have any effect and larger ones
- * may lead to oscillations.
- * To be better than that, resampling (or a rewrite of the encoder) is
- * required.
+ * However, for very fast speeds - when 1 LTC bit is
+ * <= 3 audio-sample - adjusting speed may lead to
+ * invalid frames.
+ *
+ * To do better than this, resampling (or a rewrite of the
+ * encoder) is required.
*/
ltc_speed -= ((ltc_enc_pos + ltc_enc_cnt - poff) - cycle_start_frame) / engine().frame_rate();
}
-#endif
// (6) encode and output