now that MTC can cause a timecode format change, make sure that our handling of the change is threadsafe

git-svn-id: svn://localhost/ardour2/branches/3.0@6243 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis
2009-12-01 13:21:41 +00:00
parent 162020e312
commit 23531b0fa5

View File

@@ -390,14 +390,22 @@ ARDOUR_UI::parameter_changed (std::string p)
break;
}
} else if (p == "video-pullup" || p == "timecode-format") {
if (session) {
primary_clock.set (session->audible_frame(), true);
secondary_clock.set (session->audible_frame(), true);
} else {
primary_clock.set (0, true);
secondary_clock.set (0, true);
}
reset_main_clocks ();
} else if (p == "show-track-meters") {
editor->toggle_meter_updating();
}
}
void
ARDOUR_UI::reset_main_clocks ()
{
ENSURE_GUI_THREAD (mem_fun (*this, &ARDOUR_UI::reset_main_clocks));
if (session) {
primary_clock.set (session->audible_frame(), true);
secondary_clock.set (session->audible_frame(), true);
} else {
primary_clock.set (0, true);
secondary_clock.set (0, true);
}
}