13
0

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
This commit is contained in:
Paul Davis 2012-10-10 21:07:24 +00:00
parent 0441bc140e
commit 8007939839
3 changed files with 13 additions and 1 deletions

View File

@ -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));

View File

@ -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 */

View File

@ -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;