From b5db1f624d347c8865c27fdae23bf4595be372d2 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 15 Jun 2006 01:34:54 +0000 Subject: Merged with trunk revision 600 git-svn-id: svn://localhost/ardour2/branches/midi@601 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/session_time.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'libs/ardour/session_time.cc') 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 #include #include +#include #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 -- cgit v1.2.3