From 0ede2d0088d6ffdbde8a2c9ec40c457e98bdabe9 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sun, 4 Nov 2012 06:31:49 +0000 Subject: LTC generator fix latency compensation. thinko: the generated timecode is offset and not the timestamp when to send it. git-svn-id: svn://localhost/ardour2/branches/3.0@13377 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/session_ltc.cc | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'libs/ardour/session_ltc.cc') diff --git a/libs/ardour/session_ltc.cc b/libs/ardour/session_ltc.cc index 599813760f..c0d98948fb 100644 --- a/libs/ardour/session_ltc.cc +++ b/libs/ardour/session_ltc.cc @@ -195,18 +195,11 @@ Session::ltc_tx_send_time_code_for_cycle (framepos_t start_frame, framepos_t end #define SIGNUM(a) ( (a) < 0 ? -1 : 1) bool speed_changed = false; - /* use port latency compensation */ -#if 1 - /* The generated timecode is offset by the port-latency, + /* port latency compensation: + * The _generated timecode_ is offset by the port-latency, * therefore the offset depends on the direction of transport. */ - framepos_t cycle_start_frame = (current_speed < 0) ? (start_frame + ltc_out_latency.max) : (start_frame - ltc_out_latency.max); -#else - /* This comes in handy when testing sync - record output on an A3 track - * see also http://tracker.ardour.org/view.php?id=5073 - */ - framepos_t cycle_start_frame = start_frame; -#endif + framepos_t cycle_start_frame = (current_speed < 0) ? (start_frame - ltc_out_latency.max) : (start_frame + ltc_out_latency.max); /* cycle-start may become negative due to latency compensation */ if (cycle_start_frame < 0) { cycle_start_frame = 0; } -- cgit v1.2.3