diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-01-05 15:56:14 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-01-05 15:56:14 +0000 |
commit | 63f77717d747f3664f9fde13e2ef7f05d4bc50fa (patch) | |
tree | 109a0d90753e0edd51a1fbe0817a8d58f21cfec4 | |
parent | e0b694f630e31039e082c1ce640dfaf85bfede3c (diff) |
remove un-needed TempoMap::frame_time_rt()
git-svn-id: svn://localhost/ardour2/branches/3.0@11165 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | libs/ardour/ardour/tempo.h | 7 | ||||
-rw-r--r-- | libs/ardour/session_time.cc | 2 | ||||
-rw-r--r-- | libs/ardour/tempo.cc | 24 |
3 files changed, 1 insertions, 32 deletions
diff --git a/libs/ardour/ardour/tempo.h b/libs/ardour/ardour/tempo.h index bfdcb17389..e377b8fd72 100644 --- a/libs/ardour/ardour/tempo.h +++ b/libs/ardour/ardour/tempo.h @@ -239,13 +239,6 @@ class TempoMap : public PBD::StatefulDestructible framecnt_t frame_time (const Timecode::BBT_Time&); - /* realtime safe variant of ::frame_time(), will throw - std::logic_error if the map is not large enough - to provide an answer. - */ - framecnt_t frame_time_rt (const Timecode::BBT_Time&); - - framecnt_t bbt_duration_at (framepos_t, const Timecode::BBT_Time&, int dir); static const Tempo& default_tempo() { return _default_tempo; } diff --git a/libs/ardour/session_time.cc b/libs/ardour/session_time.cc index 38eb0b4b28..04d8cf2fbb 100644 --- a/libs/ardour/session_time.cc +++ b/libs/ardour/session_time.cc @@ -559,7 +559,7 @@ Session::convert_to_frames (AnyTime const & position) switch (position.type) { case AnyTime::BBT: - return _tempo_map->frame_time_rt (position.bbt); + return _tempo_map->frame_time (position.bbt); break; case AnyTime::Timecode: diff --git a/libs/ardour/tempo.cc b/libs/ardour/tempo.cc index 8f7c4b5875..879e44ba64 100644 --- a/libs/ardour/tempo.cc +++ b/libs/ardour/tempo.cc @@ -1060,30 +1060,6 @@ TempoMap::frame_time (const BBT_Time& bbt) } } -framepos_t -TempoMap::frame_time_rt (const BBT_Time& bbt) -{ - Glib::RWLock::ReaderLock lm (lock, Glib::TRY_LOCK); - - if (!lm.locked()) { - throw std::logic_error ("TempoMap::bbt_time_rt() could not lock tempo map"); - } - - if (_map->empty() || _map->back().bar < bbt.bars || (_map->back().bar == bbt.bars && _map->back().beat < bbt.beats)) { - throw std::logic_error (string_compose ("map not long enough to reach %1", bbt)); - } - - BBTPointList::const_iterator s = bbt_before_or_at (BBT_Time (1, 1, 0)); - BBTPointList::const_iterator e = bbt_before_or_at (BBT_Time (bbt.bars, bbt.beats, 0)); - - if (bbt.ticks != 0) { - return ((*e).frame - (*s).frame) + - llrint ((*e).meter->frames_per_division (*(*e).tempo, _frame_rate) * (bbt.ticks/BBT_Time::ticks_per_bar_division)); - } else { - return ((*e).frame - (*s).frame); - } -} - framecnt_t TempoMap::bbt_duration_at (framepos_t pos, const BBT_Time& bbt, int dir) { |