summaryrefslogtreecommitdiff
path: root/libs/ardour/tempo.cc
diff options
context:
space:
mode:
authornick_m <mainsbridge@gmail.com>2016-05-28 00:10:53 +1000
committernick_m <mainsbridge@gmail.com>2016-05-28 00:10:53 +1000
commit78bec77c3e4deeffcb02da3e8de5b034705a6ebb (patch)
treee5a84d45fc79feb5de73708251cd4974d9d6f229 /libs/ardour/tempo.cc
parentbf96a74e96224f620105e8ec6a87361e15055c8c (diff)
Tempo ramps - fix merge conflicts, add bbt_at_frame_rt().
Diffstat (limited to 'libs/ardour/tempo.cc')
-rw-r--r--libs/ardour/tempo.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/libs/ardour/tempo.cc b/libs/ardour/tempo.cc
index 693f5234ee..b258734c89 100644
--- a/libs/ardour/tempo.cc
+++ b/libs/ardour/tempo.cc
@@ -1860,6 +1860,18 @@ TempoMap::bbt_at_frame (framepos_t frame)
return bbt_at_frame_locked (_metrics, frame);
}
+BBT_Time
+TempoMap::bbt_at_frame_rt (framepos_t frame)
+{
+ Glib::Threads::RWLock::ReaderLock lm (lock, Glib::Threads::TRY_LOCK);
+
+ if (!lm.locked()) {
+ throw std::logic_error ("TempoMap::bbt_time_rt() could not lock tempo map");
+ }
+
+ return bbt_at_frame_locked (_metrics, frame);
+}
+
Timecode::BBT_Time
TempoMap::bbt_at_frame_locked (const Metrics& metrics, const framepos_t& frame) const
{