int busy_guard1;
int busy_guard2;
+ TimecodeFormat mtc_timecode;
+ TimecodeFormat a3e_timecode;
+ bool printed_timecode_warning;
+
/* DLL - chase MTC */
double t0; ///< time at the beginning of the MTC quater frame
double t1; ///< calculated end of the MTC quater frame
last_mtc_fps_byte = session.get_mtc_timecode_bits ();
+ mtc_timecode = timecode_60; // track changes of MTC timecode
+ a3e_timecode = timecode_60; // track canges of Ardour's timecode
+ printed_timecode_warning = false;
+
reset (true);
rebind (p);
}
}
if (reset_tc) {
- if (!did_reset_tc_format) {
- saved_tc_format = session.config.get_timecode_format();
- did_reset_tc_format = true;
+ TimecodeFormat cur_timecode = session.config.get_timecode_format();
+ if (0 /* TODO preferences */) {
+ /* enforce time-code */
+ if (!did_reset_tc_format) {
+ saved_tc_format = cur_timecode;
+ did_reset_tc_format = true;
+ }
+ if (cur_timecode != tc_format) {
+ warning << _("Session and MTC framerate mismatch.") << endmsg;
+ }
+ session.config.set_timecode_format (tc_format);
+ } else {
+ /* only warn about TC mismatch */
+ if (mtc_timecode != tc_format) printed_timecode_warning = false;
+ if (a3e_timecode != cur_timecode) printed_timecode_warning = false;
+
+ if (cur_timecode != tc_format && ! printed_timecode_warning) {
+ warning << _("Session and MTC framerate mismatch.") << endmsg;
+ printed_timecode_warning = true;
+ }
}
- session.config.set_timecode_format (tc_format);
+ mtc_timecode = tc_format;
+ a3e_timecode = cur_timecode;
}
DEBUG_TRACE (DEBUG::MTC, string_compose ("MTC at %1 TC %2 = mtc_frame %3 (from full message ? %4)\n",