From 6941d0b74d4588e077a8761bd7cf6275b1c3460a Mon Sep 17 00:00:00 2001 From: Ben Loftis Date: Mon, 19 Dec 2016 17:20:56 -0600 Subject: Fix the case of jump-to-next-Subdivision --- libs/ardour/tempo.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'libs/ardour/tempo.cc') diff --git a/libs/ardour/tempo.cc b/libs/ardour/tempo.cc index 995eb56798..4e6a853ec5 100644 --- a/libs/ardour/tempo.cc +++ b/libs/ardour/tempo.cc @@ -3808,9 +3808,14 @@ TempoMap::round_to_quarter_note_subdivision (framepos_t fr, int sub_num, RoundMo ticks += ticks_one_subdivisions_worth - mod; } - if (ticks >= BBT_Time::ticks_per_beat) { - ticks -= BBT_Time::ticks_per_beat; - } +//NOTE: this code intentionally limits the rounding so we don't advance to the next beat. +// For the purposes of "jump-to-next-subdivision", we DO want to advance to the next beat. +// And since the "prev" direction DOES move beats, I assume this code is unintended. +// But I'm keeping it around, until we determine there are no terrible consequences. +// if (ticks >= BBT_Time::ticks_per_beat) { +// ticks -= BBT_Time::ticks_per_beat; +// } + } else if (dir < 0) { /* round to previous (or same iff dir == RoundDownMaybe) */ -- cgit v1.2.3