13
0

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
This commit is contained in:
Robin Gareus 2012-11-04 06:31:49 +00:00
parent fd9ca8354e
commit 0ede2d0088

View File

@ -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) #define SIGNUM(a) ( (a) < 0 ? -1 : 1)
bool speed_changed = false; bool speed_changed = false;
/* use port latency compensation */ /* port latency compensation:
#if 1 * The _generated timecode_ is offset by the port-latency,
/* The generated timecode is offset by the port-latency,
* therefore the offset depends on the direction of transport. * 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); 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
/* cycle-start may become negative due to latency compensation */ /* cycle-start may become negative due to latency compensation */
if (cycle_start_frame < 0) { cycle_start_frame = 0; } if (cycle_start_frame < 0) { cycle_start_frame = 0; }