deeper fixes for 80/100 subframes choice
git-svn-id: svn://localhost/ardour2/trunk@1146 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
@@ -108,7 +108,7 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], string rcfile)
|
||||
|
||||
/* big clock */
|
||||
|
||||
big_clock ("BigClockDisplay", true),
|
||||
big_clock ("BigClockDisplay", true, false, true),
|
||||
|
||||
/* transport */
|
||||
|
||||
|
||||
@@ -1098,6 +1098,7 @@ Editor::parameter_changed (const char* parameter_name)
|
||||
edit_mode_selector.set_active_text (edit_mode_to_string (Config->get_edit_mode()));
|
||||
} else if (PARAM_IS ("subframes_per_frame")) {
|
||||
update_subframes_per_frame ();
|
||||
update_just_smpte ();
|
||||
}
|
||||
|
||||
#undef PARAM_IS
|
||||
|
||||
@@ -853,7 +853,7 @@ Editor::metric_get_smpte (GtkCustomRulerMark **marks, gdouble lower, gdouble upp
|
||||
if (range < (2 * session->frames_per_smpte_frame())) { /* 0 - 2 frames */
|
||||
show_bits = true;
|
||||
mark_modulo = 20;
|
||||
nmarks = 1 + 160;
|
||||
nmarks = 1 + (2 * Config->get_subframes_per_frame());
|
||||
} else if (range <= (fr / 4)) { /* 2 frames - 0.250 second */
|
||||
show_frames = true;
|
||||
mark_modulo = 1;
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#define SMPTE_IS_ZERO( sm ) (!(sm).frames && !(sm).seconds && !(sm).minutes && !(sm).hours && !(sm.subframes))
|
||||
|
||||
#include <control_protocol/smpte.h>
|
||||
#include <ardour/configuration.h>
|
||||
|
||||
namespace SMPTE {
|
||||
|
||||
@@ -38,7 +39,7 @@ increment( Time& smpte )
|
||||
if (smpte.negative) {
|
||||
if (SMPTE_IS_AROUND_ZERO(smpte) && smpte.subframes) {
|
||||
// We have a zero transition involving only subframes
|
||||
smpte.subframes = 80 - smpte.subframes;
|
||||
smpte.subframes = ARDOUR::Config->get_subframes_per_frame() - smpte.subframes;
|
||||
smpte.negative = false;
|
||||
return SECONDS;
|
||||
}
|
||||
@@ -121,7 +122,7 @@ decrement( Time& smpte )
|
||||
return wrap;
|
||||
} else if (SMPTE_IS_AROUND_ZERO(smpte) && smpte.subframes) {
|
||||
// We have a zero transition involving only subframes
|
||||
smpte.subframes = 80 - smpte.subframes;
|
||||
smpte.subframes = ARDOUR::Config->get_subframes_per_frame() - smpte.subframes;
|
||||
smpte.negative = true;
|
||||
return SECONDS;
|
||||
}
|
||||
@@ -212,7 +213,7 @@ increment_subframes( Time& smpte )
|
||||
}
|
||||
|
||||
smpte.subframes++;
|
||||
if (smpte.subframes >= 80) {
|
||||
if (smpte.subframes >= ARDOUR::Config->get_subframes_per_frame()) {
|
||||
smpte.subframes = 0;
|
||||
increment( smpte );
|
||||
return FRAMES;
|
||||
|
||||
Reference in New Issue
Block a user