summaryrefslogtreecommitdiff
path: root/libs/ardour/tempo.cc
diff options
context:
space:
mode:
authornick_m <mainsbridge@gmail.com>2016-05-28 06:50:22 +1000
committernick_m <mainsbridge@gmail.com>2016-05-28 06:50:22 +1000
commita924e938aa282a03d7ce146419652187d5e92774 (patch)
tree0c33cb190870cbcdbd4c9214e928daf202fd2add /libs/ardour/tempo.cc
parent0d17c21410bc4b4333ec4d8e50d603dde692dce9 (diff)
Allow non-musical snap when dragging bbt ruler.
- probably not what the user wants, unless snapping beats to timecode frames.
Diffstat (limited to 'libs/ardour/tempo.cc')
-rw-r--r--libs/ardour/tempo.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/libs/ardour/tempo.cc b/libs/ardour/tempo.cc
index a4744dc445..e01aa52a76 100644
--- a/libs/ardour/tempo.cc
+++ b/libs/ardour/tempo.cc
@@ -2673,14 +2673,16 @@ TempoMap::gui_dilate_tempo (TempoSection* ts, const framepos_t& frame, const fra
constant to constant is straightforward, as the tempo prev to prev_t has constant slope.
*/
double contribution = 0.0;
- double start_pulse = prev_t->pulse_at_frame (frame, _frame_rate);
if (next_t && prev_to_prev_t && prev_to_prev_t->type() == TempoSection::Ramp) {
contribution = (prev_t->frame() - prev_to_prev_t->frame()) / (double) (next_t->frame() - prev_to_prev_t->frame());
}
- frameoffset_t prev_t_frame_contribution = fr_off - (contribution * (double) fr_off);
- double end_pulse = prev_t->pulse_at_frame (end_frame, _frame_rate);
+ const frameoffset_t prev_t_frame_contribution = fr_off - (contribution * (double) fr_off);
+
+ const double start_pulse = prev_t->pulse_at_frame (frame, _frame_rate);
+ const double end_pulse = prev_t->pulse_at_frame (end_frame, _frame_rate);
+
double new_bpm;
if (prev_t->type() == TempoSection::Constant || prev_t->c_func() == 0.0) {