diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-10-10 21:07:24 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-10-10 21:07:24 +0000 |
commit | 80079398397f6a89fa8054ffc7732511bf8a70df (patch) | |
tree | 3eda9cd7f12e3de7ef5b2b2879cb4bbf0f126145 | |
parent | 0441bc140edaa4edb57bd1b4caf34d15b3f9a3bc (diff) |
add global config parameter timecode-sync-frame-rate to control behaviour when a timecode slave (MTC, LTC) has a different frame rate than an Ardour session
git-svn-id: svn://localhost/ardour2/branches/3.0@13233 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | gtk2_ardour/rc_option_editor.cc | 11 | ||||
-rw-r--r-- | libs/ardour/ardour/rc_configuration_vars.h | 1 | ||||
-rw-r--r-- | libs/ardour/mtc_slave.cc | 2 |
3 files changed, 13 insertions, 1 deletions
diff --git a/gtk2_ardour/rc_option_editor.cc b/gtk2_ardour/rc_option_editor.cc index 9ba83021d5..b298e79880 100644 --- a/gtk2_ardour/rc_option_editor.cc +++ b/gtk2_ardour/rc_option_editor.cc @@ -885,6 +885,17 @@ RCOptionEditor::RCOptionEditor () add_option (_("Misc"), procs); } + add_option (_("Misc"), new OptionEditorHeading (S_("Sync/Slave"))); + + BoolOption* tsf = new BoolOption ( + "timecode-sync-frame-rate", + _("Force Ardour's timecode rate to match timecode master"), + sigc::mem_fun (*_rc_config, &RCConfiguration::get_timecode_sync_frame_rate), + sigc::mem_fun (*_rc_config, &RCConfiguration::set_timecode_sync_frame_rate) + ); + tsf->set_note (_("If off, Ardour will chase the master but will use its own timecode frame rate")); + add_option (_("Misc"), tsf); + add_option (_("Misc"), new OptionEditorHeading (S_("Options|Undo"))); add_option (_("Misc"), new UndoOptions (_rc_config)); diff --git a/libs/ardour/ardour/rc_configuration_vars.h b/libs/ardour/ardour/rc_configuration_vars.h index 09b0c55a74..a337bf8079 100644 --- a/libs/ardour/ardour/rc_configuration_vars.h +++ b/libs/ardour/ardour/rc_configuration_vars.h @@ -44,6 +44,7 @@ CONFIG_VARIABLE (int32_t, mmc_receive_device_id, "mmc-receive-device-id", 0x7f) CONFIG_VARIABLE (int32_t, mmc_send_device_id, "mmc-send-device-id", 0) CONFIG_VARIABLE (int32_t, initial_program_change, "initial-program-change", -1) CONFIG_VARIABLE (int, mtc_qf_speed_tolerance, "mtc-qf-speed-tolerance", 5) +CONFIG_VARIABLE (bool, timecode_sync_frame_rate, "timecode-sync-frame-rate", true) CONFIG_VARIABLE (bool, first_midi_bank_is_zero, "diplay-first-midi-bank-as-zero", false) /* control surfaces */ diff --git a/libs/ardour/mtc_slave.cc b/libs/ardour/mtc_slave.cc index ff1bdc4583..f2477b4175 100644 --- a/libs/ardour/mtc_slave.cc +++ b/libs/ardour/mtc_slave.cc @@ -337,7 +337,7 @@ MTC_Slave::update_mtc_time (const byte *msg, bool was_full, framepos_t now) if (reset_tc) { TimecodeFormat cur_timecode = session.config.get_timecode_format(); - if (0 /* TODO preferences */) { + if (Config->get_timecode_sync_frame_rate()) { /* enforce time-code */ if (!did_reset_tc_format) { saved_tc_format = cur_timecode; |