+ framepos_t cycle_start_frame;
+
+ if (current_speed < 0) {
+ cycle_start_frame = (start_frame - ltc_out_latency.max + worst_playback_latency());
+ } else if (current_speed > 0) {
+ cycle_start_frame = (start_frame + ltc_out_latency.max - worst_playback_latency());
+ } else {
+ /* There is no need to compensate for latency when not rolling
+ * rather send the accurate NOW timecode
+ * (LTC encoder compenates latency by sending earlier timecode)
+ */
+ cycle_start_frame = start_frame;
+ }
+
+ /* LTC TV standard offset */
+ if (current_speed != 0) {
+ /* ditto - send "NOW" if not rolling */
+ cycle_start_frame -= ltc_frame_alignment(frames_per_timecode_frame(), TV_STANDARD(cur_timecode));
+ }