TempoMap::pulse_at_frame() handles separated musical sections as per beat_at_frame().
authornick_m <mainsbridge@gmail.com>
Wed, 31 Aug 2016 12:45:25 +0000 (22:45 +1000)
committernick_m <mainsbridge@gmail.com>
Wed, 31 Aug 2016 13:12:11 +0000 (23:12 +1000)
libs/ardour/tempo.cc

index 2dad0bb354e233424b7f8c168933410f8280bff3..3a938c54d450340b44c5b8fac32700689e35ca59 100644 (file)
@@ -1706,6 +1706,10 @@ TempoMap::pulse_at_frame_locked (const Metrics& metrics, const framepos_t& frame
                        if (prev_t && t->frame() > frame) {
                                /*the previous ts is the one containing the frame */
                                const double ret = prev_t->pulse_at_frame (frame, _frame_rate);
+                               /* audio locked section in new meter*/
+                               if (t->pulse() < ret) {
+                                       return t->pulse();
+                               }
                                return ret;
                        }
                        prev_t = t;