summaryrefslogtreecommitdiff
path: root/libs/ardour/session_time.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/session_time.cc')
-rw-r--r--libs/ardour/session_time.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/libs/ardour/session_time.cc b/libs/ardour/session_time.cc
index 453f5d6d27..d597860a5e 100644
--- a/libs/ardour/session_time.cc
+++ b/libs/ardour/session_time.cc
@@ -32,6 +32,7 @@
#include <ardour/audioengine.h>
#include <ardour/session.h>
#include <ardour/tempo.h>
+#include <ardour/audiofilesource.h>
#include "i18n.h"
@@ -95,6 +96,9 @@ Session::set_smpte_offset (jack_nframes_t off)
{
_smpte_offset = off;
last_smpte_valid = false;
+
+ AudioFileSource::set_header_position_offset (_smpte_offset, _smpte_offset_negative);
+
SMPTEOffsetChanged (); /* EMIT SIGNAL */
}
@@ -103,6 +107,9 @@ Session::set_smpte_offset_negative (bool neg)
{
_smpte_offset_negative = neg;
last_smpte_valid = false;
+
+ AudioFileSource::set_header_position_offset (_smpte_offset, _smpte_offset_negative);
+
SMPTEOffsetChanged (); /* EMIT SIGNAL */
}
@@ -194,7 +201,7 @@ void
Session::sample_to_smpte( jack_nframes_t sample, SMPTE::Time& smpte, bool use_offset, bool use_subframes ) const
{
jack_nframes_t offset_sample;
-
+
if (!use_offset) {
offset_sample = sample;
smpte.negative = false;
@@ -326,7 +333,7 @@ Session::smpte_duration_string (char* buf, jack_nframes_t when) const
SMPTE::Time smpte;
smpte_duration (when, smpte);
- snprintf (buf, sizeof (buf), "%02ld:%02ld:%02ld:%02ld", smpte.hours, smpte.minutes, smpte.seconds, smpte.frames);
+ snprintf (buf, sizeof (buf), "%02" PRIu32 ":%02" PRIu32 ":%02" PRIu32 ":%02" PRIu32, smpte.hours, smpte.minutes, smpte.seconds, smpte.frames);
}
void