summaryrefslogtreecommitdiff
path: root/libs/ardour/session_time.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-06-15 01:34:54 +0000
committerDavid Robillard <d@drobilla.net>2006-06-15 01:34:54 +0000
commitb5db1f624d347c8865c27fdae23bf4595be372d2 (patch)
tree19d57731a87490c8de9773b64ee7ba76d244dc73 /libs/ardour/session_time.cc
parenta8f44b1556e68f4cf28bd52e6de7359581a1ec45 (diff)
Merged with trunk revision 600
git-svn-id: svn://localhost/ardour2/branches/midi@601 d708f5d6-7413-0410-9779-e7cbd77b26cf
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