deeper fixes for 80/100 subframes choice
authorPaul Davis <paul@linuxaudiosystems.com>
Mon, 20 Nov 2006 21:40:11 +0000 (21:40 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 20 Nov 2006 21:40:11 +0000 (21:40 +0000)
git-svn-id: svn://localhost/ardour2/trunk@1146 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/ardour_ui.cc
gtk2_ardour/editor_actions.cc
gtk2_ardour/editor_rulers.cc
libs/surfaces/control_protocol/smpte.cc

index 278b9c30eba0d49b761e9e3169f1e16b03d89eb0..768a27e5b5e2ec299271971feada7978f04dba3e 100644 (file)
@@ -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 */
 
index 9dfd87259b36fdac4ec70b41137d801756aa1c05..3cb14dd9dbfa41df58cd95612dbaefea01f72bf2 100644 (file)
@@ -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
index 68db74adfb7f2fe1bc32f9c2254d411bd45756a5..d42ebf1e7f0579300a2641e3c58bafec58ee63eb 100644 (file)
@@ -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;
index 55d0660c59203a1924837ab2569afde1629349ab..9b99d051600b2b2c4a4cbc1f41fdef8292e887a8 100644 (file)
@@ -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;