diff options
author | Robin Gareus <robin@gareus.org> | 2012-11-18 09:53:13 +0000 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2012-11-18 09:53:13 +0000 |
commit | 89fa20bb75e453f0616ee2fa8425afe14773a34c (patch) | |
tree | 6e5cb2f1b3975b9b450c905a30018a61e1033f3f /libs | |
parent | 4269bccfebbd6b03206e8e8e225d59527589524c (diff) |
fix LTC frame TVstandard offset
<pre>
Ardour-
transport
01:00:00:01
|
|
5 5 | NTSC Line
2 2 | 1
4 5 v 1 2 3 4 5 6 7 8 9 0
____________________ ________________ TV
| | | | | | | | |_|_|_|_|_|_| | | | | | | |
^
|
v
+-+ +-+ + + +-+ +-+ +---+ +---+
| | | | | | | | | | | | | | | | LTC
+-+ +-+ +-+ +-+ +---+ +-+ +---+ +---+
SYNC-WORD |
LTC B | B LTC
01:00:00:00 I | I 01:00:00:01
T T
7
9 0
</pre>
git-svn-id: svn://localhost/ardour2/branches/3.0@13524 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/ltc_slave.cc | 8 | ||||
-rw-r--r-- | libs/ardour/session_ltc.cc | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/libs/ardour/ltc_slave.cc b/libs/ardour/ltc_slave.cc index 5d3ee83139..f063e830c1 100644 --- a/libs/ardour/ltc_slave.cc +++ b/libs/ardour/ltc_slave.cc @@ -359,13 +359,13 @@ LTC_Slave::process_ltc(framepos_t const now) ltc_frame_increment(&frame.ltc, fps_i, tv_standard, 0); ltc_frame_to_time(&stime, &frame.ltc, 0); transport_direction = 1; - frame.off_start += ltc_frame_alignment(session.frames_per_timecode_frame(), tv_standard); - frame.off_end += ltc_frame_alignment(session.frames_per_timecode_frame(), tv_standard); + frame.off_start -= ltc_frame_alignment(session.frames_per_timecode_frame(), tv_standard); + frame.off_end -= ltc_frame_alignment(session.frames_per_timecode_frame(), tv_standard); } else { ltc_frame_decrement(&frame.ltc, fps_i, tv_standard, 0); int off = frame.off_end - frame.off_start; - frame.off_start += off + ltc_frame_alignment(session.frames_per_timecode_frame(), tv_standard); - frame.off_end += off + ltc_frame_alignment(session.frames_per_timecode_frame(), tv_standard); + frame.off_start += off - ltc_frame_alignment(session.frames_per_timecode_frame(), tv_standard); + frame.off_end += off - ltc_frame_alignment(session.frames_per_timecode_frame(), tv_standard); transport_direction = -1; } diff --git a/libs/ardour/session_ltc.cc b/libs/ardour/session_ltc.cc index d30e157a1b..177598091e 100644 --- a/libs/ardour/session_ltc.cc +++ b/libs/ardour/session_ltc.cc @@ -246,7 +246,7 @@ Session::ltc_tx_send_time_code_for_cycle (framepos_t start_frame, framepos_t end framepos_t cycle_start_frame = (current_speed < 0) ? (start_frame - ltc_out_latency.max) : (start_frame + ltc_out_latency.max); /* LTC TV standard offset */ - cycle_start_frame += ltc_frame_alignment(frames_per_timecode_frame(), TV_STANDARD(cur_timecode)); + cycle_start_frame -= ltc_frame_alignment(frames_per_timecode_frame(), TV_STANDARD(cur_timecode)); /* cycle-start may become negative due to latency compensation */ if (cycle_start_frame < 0) { cycle_start_frame = 0; } |