From a924e938aa282a03d7ce146419652187d5e92774 Mon Sep 17 00:00:00 2001 From: nick_m Date: Sat, 28 May 2016 06:50:22 +1000 Subject: Allow non-musical snap when dragging bbt ruler. - probably not what the user wants, unless snapping beats to timecode frames. --- libs/ardour/tempo.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'libs/ardour/tempo.cc') 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) { -- cgit v1.2.3