diff options
Diffstat (limited to 'libs/ardour/ardour/tempo.h')
-rw-r--r-- | libs/ardour/ardour/tempo.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/libs/ardour/ardour/tempo.h b/libs/ardour/ardour/tempo.h index 09d8a64695..bfdcb17389 100644 --- a/libs/ardour/ardour/tempo.h +++ b/libs/ardour/ardour/tempo.h @@ -231,7 +231,21 @@ class TempoMap : public PBD::StatefulDestructible framepos_t start, framepos_t end); void bbt_time (framepos_t when, Timecode::BBT_Time&); + /* realtime safe variant of ::bbt_time(), will throw + std::logic_error if the map is not large enough + to provide an answer. + */ + void bbt_time_rt (framepos_t when, Timecode::BBT_Time&); + + 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; } @@ -300,13 +314,13 @@ class TempoMap : public PBD::StatefulDestructible mutable Glib::RWLock lock; BBTPointList* _map; - void recompute_map (bool reassign_tempo_bbt, bool use_write_lock, framepos_t end = -1); + void recompute_map (bool reassign_tempo_bbt, framepos_t end = -1); void require_map_to (framepos_t pos); void require_map_to (const Timecode::BBT_Time&); BBTPointList::const_iterator bbt_before_or_at (framepos_t); + BBTPointList::const_iterator bbt_before_or_at (const Timecode::BBT_Time&); BBTPointList::const_iterator bbt_after_or_at (framepos_t); - BBTPointList::const_iterator bbt_point_for (const Timecode::BBT_Time&); framepos_t round_to_type (framepos_t fr, int dir, BBTPointType); |