add initial midi sidechain if plugin has one.
[ardour.git] / libs / ardour / session_ltc.cc
index 1ac26816410c0ce73fde17cfde0a2b1c16a885d4..945f96519e3f60a8c7ed1c7483eacf9b8d0c4e47 100644 (file)
@@ -27,7 +27,7 @@
 #include "ardour/session.h"
 #include "ardour/slave.h"
 
-#include "i18n.h"
+#include "pbd/i18n.h"
 
 using namespace std;
 using namespace ARDOUR;
@@ -261,9 +261,9 @@ Session::ltc_tx_send_time_code_for_cycle (framepos_t start_frame, framepos_t end
        framepos_t cycle_start_frame;
 
        if (current_speed < 0) {
-               cycle_start_frame = (start_frame - ltc_out_latency.max);
+               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);
+               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