diff options
author | Robin Gareus <robin@gareus.org> | 2012-11-09 17:27:30 +0000 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2012-11-09 17:27:30 +0000 |
commit | c27dde889c27f7872318c004ce96daed577224d7 (patch) | |
tree | 9749200b47aa4a9ee7fe39121ea4a79ba69ab9e2 | |
parent | ca7e72db62a6d4412002bc3872ba5e2b11d12646 (diff) |
make timecode offset work
git-svn-id: svn://localhost/ardour2/branches/3.0@13418 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | gtk2_ardour/option_editor.cc | 9 | ||||
-rw-r--r-- | gtk2_ardour/option_editor.h | 1 | ||||
-rw-r--r-- | libs/ardour/ltc_slave.cc | 2 | ||||
-rw-r--r-- | libs/ardour/mtc_slave.cc | 2 |
4 files changed, 11 insertions, 3 deletions
diff --git a/gtk2_ardour/option_editor.cc b/gtk2_ardour/option_editor.cc index a6fcc734c5..3c3f5baab6 100644 --- a/gtk2_ardour/option_editor.cc +++ b/gtk2_ardour/option_editor.cc @@ -293,12 +293,19 @@ ClockOption::ClockOption (string const & i, string const & n, sigc::slot<framecn _label.set_text (n + ":"); _label.set_alignment (0, 0.5); _label.set_name (X_("OptionsLabel")); + _clock.ValueChanged.connect (sigc::mem_fun (*this, &ClockOption::save_clock_time)); } void ClockOption::set_state_from_config () { - _clock.set (_get ()); + _clock.set (_get (), true); +} + +void +ClockOption::save_clock_time () +{ + _set (_clock.current_time()); } void diff --git a/gtk2_ardour/option_editor.h b/gtk2_ardour/option_editor.h index 07c11ac8b4..68ffe1f969 100644 --- a/gtk2_ardour/option_editor.h +++ b/gtk2_ardour/option_editor.h @@ -543,6 +543,7 @@ public: Gtk::Widget& tip_widget() { return _clock; } private: + void save_clock_time (); Gtk::Label _label; AudioClock _clock; sigc::slot<ARDOUR::framecnt_t> _get; diff --git a/libs/ardour/ltc_slave.cc b/libs/ardour/ltc_slave.cc index f28770b175..db3c8c3721 100644 --- a/libs/ardour/ltc_slave.cc +++ b/libs/ardour/ltc_slave.cc @@ -331,7 +331,7 @@ LTC_Slave::process_ltc(framepos_t const now) /* map LTC timecode to session TC setting */ framepos_t ltc_frame; ///< audio-frame corresponding to LTC frame - Timecode::timecode_to_sample (timecode, ltc_frame, true, false, + Timecode::timecode_to_sample (timecode, ltc_frame, false, false, double(session.frame_rate()), session.config.get_subframes_per_frame(), session.config.get_timecode_offset_negative(), session.config.get_timecode_offset() diff --git a/libs/ardour/mtc_slave.cc b/libs/ardour/mtc_slave.cc index d7ec6eb24e..d5c14111b5 100644 --- a/libs/ardour/mtc_slave.cc +++ b/libs/ardour/mtc_slave.cc @@ -387,7 +387,7 @@ MTC_Slave::update_mtc_time (const byte *msg, bool was_full, framepos_t now) quarter_frame_duration = (double(session.frame_rate()) / (double) timecode.rate / 4.0); - Timecode::timecode_to_sample (timecode, mtc_frame, true, false, + Timecode::timecode_to_sample (timecode, mtc_frame, false, false, double(session.frame_rate()), session.config.get_subframes_per_frame(), session.config.get_timecode_offset_negative(), session.config.get_timecode_offset() |