Don't notify user if fps changes only affect speed but not counting.

also unify labels for 29..97XX and simplify fps display.

git-svn-id: svn://localhost/ardour2/branches/3.0@13412 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Robin Gareus 2012-11-09 14:24:31 +00:00
parent 8dc98a2935
commit 5eeefbb3a5
4 changed files with 27 additions and 25 deletions

View file

@ -1084,7 +1084,7 @@ ARDOUR_UI::update_timecode_format ()
matching = true; matching = true;
} }
snprintf (buf, sizeof (buf), S_("Timecode|TC: <span foreground=\"%s\">%sfps</span>"), snprintf (buf, sizeof (buf), S_("Timecode|TC: <span foreground=\"%s\">%s</span>"),
matching ? X_("green") : X_("red"), matching ? X_("green") : X_("red"),
Timecode::timecode_format_name (_session->config.get_timecode_format()).c_str()); Timecode::timecode_format_name (_session->config.get_timecode_format()).c_str());
} else { } else {

View file

@ -240,10 +240,12 @@ LTC_Slave::detect_ltc_fps(int frameno, bool df)
did_reset_tc_format = true; did_reset_tc_format = true;
} }
if (cur_timecode != tc_format) { if (cur_timecode != tc_format) {
warning << string_compose(_("Session framerate adjusted from %1 to LTC's %2."), if (ceil(Timecode::timecode_to_frames_per_second(cur_timecode)) != ceil(Timecode::timecode_to_frames_per_second(tc_format))) {
Timecode::timecode_format_name(cur_timecode), warning << string_compose(_("Session framerate adjusted from %1 to LTC's %2."),
Timecode::timecode_format_name(tc_format)) Timecode::timecode_format_name(cur_timecode),
<< endmsg; Timecode::timecode_format_name(tc_format))
<< endmsg;
}
session.config.set_timecode_format (tc_format); session.config.set_timecode_format (tc_format);
} }
} else { } else {
@ -252,10 +254,12 @@ LTC_Slave::detect_ltc_fps(int frameno, bool df)
if (a3e_timecode != cur_timecode) printed_timecode_warning = false; if (a3e_timecode != cur_timecode) printed_timecode_warning = false;
if (cur_timecode != tc_format && ! printed_timecode_warning) { if (cur_timecode != tc_format && ! printed_timecode_warning) {
warning << string_compose(_("Session and LTC framerate mismatch: LTC:%1 Session:%2."), if (ceil(Timecode::timecode_to_frames_per_second(cur_timecode)) != ceil(Timecode::timecode_to_frames_per_second(tc_format))) {
Timecode::timecode_format_name(tc_format), warning << string_compose(_("Session and LTC framerate mismatch: LTC:%1 Session:%2."),
Timecode::timecode_format_name(cur_timecode)) Timecode::timecode_format_name(tc_format),
<< endmsg; Timecode::timecode_format_name(cur_timecode))
<< endmsg;
}
printed_timecode_warning = true; printed_timecode_warning = true;
} }
} }

View file

@ -351,10 +351,12 @@ MTC_Slave::update_mtc_time (const byte *msg, bool was_full, framepos_t now)
did_reset_tc_format = true; did_reset_tc_format = true;
} }
if (cur_timecode != tc_format) { if (cur_timecode != tc_format) {
warning << string_compose(_("Session framerate adjusted from %1 TO: MTC's %2."), if (ceil(Timecode::timecode_to_frames_per_second(cur_timecode)) != ceil(Timecode::timecode_to_frames_per_second(tc_format))) {
Timecode::timecode_format_name(cur_timecode), warning << string_compose(_("Session framerate adjusted from %1 TO: MTC's %2."),
Timecode::timecode_format_name(tc_format)) Timecode::timecode_format_name(cur_timecode),
<< endmsg; Timecode::timecode_format_name(tc_format))
<< endmsg;
}
} }
session.config.set_timecode_format (tc_format); session.config.set_timecode_format (tc_format);
} else { } else {
@ -363,10 +365,12 @@ MTC_Slave::update_mtc_time (const byte *msg, bool was_full, framepos_t now)
if (a3e_timecode != cur_timecode) printed_timecode_warning = false; if (a3e_timecode != cur_timecode) printed_timecode_warning = false;
if (cur_timecode != tc_format && ! printed_timecode_warning) { if (cur_timecode != tc_format && ! printed_timecode_warning) {
warning << string_compose(_("Session and MTC framerate mismatch: MTC:%1 Ardour:%2."), if (ceil(Timecode::timecode_to_frames_per_second(cur_timecode)) != ceil(Timecode::timecode_to_frames_per_second(tc_format))) {
Timecode::timecode_format_name(tc_format), warning << string_compose(_("Session and MTC framerate mismatch: MTC:%1 Ardour:%2."),
Timecode::timecode_format_name(cur_timecode)) Timecode::timecode_format_name(tc_format),
<< endmsg; Timecode::timecode_format_name(cur_timecode))
<< endmsg;
}
printed_timecode_warning = true; printed_timecode_warning = true;
} }
} }

View file

@ -563,21 +563,15 @@ timecode_format_name (TimecodeFormat const t)
return "25"; return "25";
break; break;
case timecode_2997000:
case timecode_2997: case timecode_2997:
return "29.97"; return "29.97";
break; break;
case timecode_2997000drop:
case timecode_2997drop: case timecode_2997drop:
return "29.97 drop"; return "29.97 drop";
break;
case timecode_2997000:
return "29.97000";
break;
case timecode_2997000drop:
return "29.97000 drop";
break; break;
case timecode_30: case timecode_30:
return "30"; return "30";