X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fsession_time.cc;h=54770d5cc8a16b5f4e64ef757a7de6980166e56a;hb=e845b9f9357c4ff471c02b1f63a61275bb4a7d28;hp=e35910f2df0bea4bef33a9232ab09df5abfe2d3b;hpb=eb3cc04eff05d8bc3024ce5ae3e4a5e84fd7aeb2;p=ardour.git diff --git a/libs/ardour/session_time.cc b/libs/ardour/session_time.cc index e35910f2df..54770d5cc8 100644 --- a/libs/ardour/session_time.cc +++ b/libs/ardour/session_time.cc @@ -46,7 +46,7 @@ using namespace PBD; void Session::bbt_time (framepos_t when, Timecode::BBT_Time& bbt) { - _tempo_map->bbt_time (when, bbt); + bbt = _tempo_map->bbt_at_frame (when); } /* Timecode TIME */ @@ -66,7 +66,7 @@ Session::timecode_drop_frames() const void Session::sync_time_vars () { - _current_frame_rate = (framecnt_t) round (_base_frame_rate * (1.0 + (config.get_video_pullup()/100.0))); + _current_frame_rate = (framecnt_t) round (_nominal_frame_rate * (1.0 + (config.get_video_pullup()/100.0))); _frames_per_timecode_frame = (double) _current_frame_rate / (double) timecode_frames_per_second(); if (timecode_drop_frames()) { _frames_per_hour = (int32_t)(107892 * _frames_per_timecode_frame); @@ -164,12 +164,12 @@ Session::timecode_duration (framecnt_t when, Timecode::Time& timecode) const } void -Session::timecode_duration_string (char* buf, framepos_t when) const +Session::timecode_duration_string (char* buf, size_t len, framepos_t when) const { Timecode::Time timecode; timecode_duration (when, timecode); - snprintf (buf, sizeof (buf), "%02" PRIu32 ":%02" PRIu32 ":%02" PRIu32 ":%02" PRIu32, timecode.hours, timecode.minutes, timecode.seconds, timecode.frames); + snprintf (buf, len, "%02" PRIu32 ":%02" PRIu32 ":%02" PRIu32 ":%02" PRIu32, timecode.hours, timecode.minutes, timecode.seconds, timecode.frames); } void @@ -226,7 +226,7 @@ Session::convert_to_frames (AnyTime const & position) switch (position.type) { case AnyTime::BBT: - return _tempo_map->frame_time (position.bbt); + return _tempo_map->frame_at_bbt (position.bbt); break; case AnyTime::Timecode: