From e0012e1b88a6a26ebaf0038f40975779480b1453 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 9 Nov 2012 07:47:59 +0000 Subject: LTC encoder: clear user-bits requires libltc >=1.0.3 git-svn-id: svn://localhost/ardour2/branches/3.0@13401 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/session_ltc.cc | 6 ++++-- libs/ardour/wscript | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'libs') diff --git a/libs/ardour/session_ltc.cc b/libs/ardour/session_ltc.cc index cc146cbb59..089a8f7d56 100644 --- a/libs/ardour/session_ltc.cc +++ b/libs/ardour/session_ltc.cc @@ -66,7 +66,7 @@ Session::ltc_tx_initialize() DEBUG_TRACE (DEBUG::LTC, string_compose("LTC TX init sr: %1 fps: %2\n", nominal_frame_rate(), timecode_to_frames_per_second(ltc_enc_tcformat))); ltc_encoder = ltc_encoder_create(nominal_frame_rate(), timecode_to_frames_per_second(ltc_enc_tcformat), - 0); + -2); ltc_encoder_set_bufsize(ltc_encoder, nominal_frame_rate(), 23.0); ltc_encoder_set_filter(ltc_encoder, LTC_RISE_TIME(1.0)); @@ -113,6 +113,8 @@ Session::ltc_tx_reset() ltc_buf_off = 0; ltc_enc_byte = 0; ltc_enc_cnt = 0; + + ltc_encoder_reset(ltc_encoder); } void @@ -193,7 +195,7 @@ Session::ltc_tx_send_time_code_for_cycle (framepos_t start_frame, framepos_t end TimecodeFormat cur_timecode = config.get_timecode_format(); if (cur_timecode != ltc_enc_tcformat) { DEBUG_TRACE (DEBUG::LTC, string_compose("LTC TX1: TC format mismatch - reinit sr: %1 fps: %2\n", nominal_frame_rate(), timecode_to_frames_per_second(cur_timecode))); - if (ltc_encoder_reinit(ltc_encoder, nominal_frame_rate(), timecode_to_frames_per_second(cur_timecode), 0)) { + if (ltc_encoder_reinit(ltc_encoder, nominal_frame_rate(), timecode_to_frames_per_second(cur_timecode), -2)) { PBD::error << _("LTC encoder: invalid framerate - LTC encoding is disabled for the remainder of this session.") << endmsg; ltc_tx_cleanup(); return; diff --git a/libs/ardour/wscript b/libs/ardour/wscript index 3a59fbfbbc..22b0ef342b 100644 --- a/libs/ardour/wscript +++ b/libs/ardour/wscript @@ -282,7 +282,7 @@ def configure(conf): autowaf.check_pkg(conf, 'libcurl', uselib_store='CURL', atleast_version='7.0.0') autowaf.check_pkg(conf, 'ltc', uselib_store='LTC', - atleast_version='0.7.0', mandatory=False) + atleast_version='1.0.3', mandatory=False) # we don't try to detect this, since its part of our source tree -- cgit v1.2.3