summaryrefslogtreecommitdiff
path: root/libs/ardour
diff options
context:
space:
mode:
authornick_m <mainsbridge@gmail.com>2016-11-22 03:17:01 +1100
committernick_m <mainsbridge@gmail.com>2016-11-22 03:17:01 +1100
commitb53ea4ea0e29c5566ed2e09664c209804d211d3b (patch)
treeb6492c1b996a5768e8df513733d5594423ec7bc5 /libs/ardour
parent766fa9aa5bd477e54a44f045e955d45eb267ebf2 (diff)
amend 66488e117 - BBT clock scrolling handles multiple audio-locked meters.
Diffstat (limited to 'libs/ardour')
-rw-r--r--libs/ardour/tempo.cc10
1 files changed, 2 insertions, 8 deletions
diff --git a/libs/ardour/tempo.cc b/libs/ardour/tempo.cc
index 65299587fe..c510731a95 100644
--- a/libs/ardour/tempo.cc
+++ b/libs/ardour/tempo.cc
@@ -3494,7 +3494,6 @@ TempoMap::bbt_duration_at (framepos_t pos, const BBT_Time& bbt, int dir)
Glib::Threads::RWLock::ReaderLock lm (lock);
BBT_Time pos_bbt = bbt_at_minute_locked (_metrics, minute_at_frame (pos));
- const framecnt_t offset = frame_at_minute (minute_at_bbt_locked (_metrics, pos_bbt));
const double divisions = meter_section_at_minute_locked (_metrics, minute_at_frame (pos)).divisions_per_bar();
@@ -3515,13 +3514,8 @@ TempoMap::bbt_duration_at (framepos_t pos, const BBT_Time& bbt, int dir)
const framecnt_t music_origin = frame_at_minute (minute_at_bbt_locked (_metrics, BBT_Time (1, 1, 0)));
const framecnt_t pos_bbt_frame = frame_at_minute (minute_at_bbt_locked (_metrics, pos_bbt));
- if (pos < music_origin) {
+ return pos_bbt_frame - pos;
- return pos_bbt_frame - pos;
- } else {
-
- return pos_bbt_frame - offset;
- }
} else {
if (pos_bbt.bars <= bbt.bars) {
@@ -3558,7 +3552,7 @@ TempoMap::bbt_duration_at (framepos_t pos, const BBT_Time& bbt, int dir)
pos_bbt.beats -= bbt.beats;
}
- return offset - frame_at_minute (minute_at_bbt_locked (_metrics, pos_bbt));
+ return pos - frame_at_minute (minute_at_bbt_locked (_metrics, pos_bbt));
}
return 0;