Merge with trunk R2978.
[ardour.git] / libs / ardour / session_time.cc
index e7bd0a3696ef1be40c2fc5c418c5c230d8aaf2c6..a388e31d80f3056822f6c2c2b8a3ddfad3d11ebe 100644 (file)
@@ -16,7 +16,6 @@
   along with this program; if not, write to the Free Software
   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-  $Id$
 */
 
 #include <iostream>
@@ -26,6 +25,7 @@
 #include <ardour/timestamps.h>
 
 #include <pbd/error.h>
+#include <pbd/enumwriter.h>
 #include <pbd/stacktrace.h>
 
 #include <ardour/ardour.h>
@@ -158,14 +158,6 @@ Session::sync_time_vars ()
        }
        _smpte_frames_per_hour = (nframes_t)rint(smpte_frames_per_second() * 3600.0);
 
-}
-
-int
-Session::set_smpte_format (SmpteFormat format)
-{
-
-       Config->set_smpte_format (format);
-
        last_smpte_valid = false;
        // smpte type bits are the middle two in the upper nibble
        switch ((int) ceil (smpte_frames_per_second())) {
@@ -186,7 +178,13 @@ Session::set_smpte_format (SmpteFormat format)
                }
                break;
        };
+}
 
+int
+Session::set_smpte_format (SmpteFormat format)
+{
+       /* this will trigger any other changes needed */
+       Config->set_smpte_format (format);
        return 0;
 }
 
@@ -569,7 +567,7 @@ Session::jack_timebase_callback (jack_transport_state_t state,
 #endif         
 }
 
-nframes_t
+ARDOUR::nframes_t
 Session::convert_to_frames_at (nframes_t position, AnyTime& any)
 {
        double secs;