summaryrefslogtreecommitdiff
path: root/libs/ardour/tempo.cc
diff options
context:
space:
mode:
authornick_m <mainsbridge@gmail.com>2016-09-01 02:43:29 +1000
committernick_m <mainsbridge@gmail.com>2016-09-01 02:43:29 +1000
commitd05bfa7206123f226d5d34d667f527fe11901346 (patch)
tree39f478476071f950956f4bed6625900d9b173548 /libs/ardour/tempo.cc
parent894cdb6f5c20641962ec86542b084fa7e5ccdf13 (diff)
Revert 894cdb6f5c2064.
- once again we snap to BBT beats when snapping to 'beat'.
Diffstat (limited to 'libs/ardour/tempo.cc')
-rw-r--r--libs/ardour/tempo.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/libs/ardour/tempo.cc b/libs/ardour/tempo.cc
index a8d5c35a68..3a938c54d4 100644
--- a/libs/ardour/tempo.cc
+++ b/libs/ardour/tempo.cc
@@ -3445,14 +3445,12 @@ TempoMap::round_to_type (framepos_t frame, RoundMode dir, BBTPointType type)
break;
case Beat:
- const double qn_at_frame = max (0.0, quarter_note_at_frame_locked (_metrics, frame));
-
if (dir < 0) {
- return frame_at_quarter_note_locked (_metrics, floor (qn_at_frame));
+ return frame_at_beat_locked (_metrics, floor (beat_at_framepos));
} else if (dir > 0) {
- return frame_at_quarter_note_locked (_metrics, ceil (qn_at_frame));
+ return frame_at_beat_locked (_metrics, ceil (beat_at_framepos));
} else {
- return frame_at_quarter_note_locked (_metrics, floor (qn_at_frame + 0.5));
+ return frame_at_beat_locked (_metrics, floor (beat_at_framepos + 0.5));
}
break;
}