remove un-needed TempoMap::frame_time_rt()
git-svn-id: svn://localhost/ardour2/branches/3.0@11165 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
@@ -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; }
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user