check audio-locked meter ordering by frame.
authornick_m <mainsbridge@gmail.com>
Wed, 21 Dec 2016 18:36:40 +0000 (05:36 +1100)
committernick_m <mainsbridge@gmail.com>
Wed, 21 Dec 2016 18:36:40 +0000 (05:36 +1100)
libs/ardour/tempo.cc

index ab7f459d1e9484415468ca7ca182c8a4ce548ed1..7c281a3e13143216888afa93507ec4db5c557640 100644 (file)
@@ -2567,10 +2567,10 @@ TempoMap::check_solved (const Metrics& metrics) const
                        m = static_cast<MeterSection*> (*i);
                        if (prev_m && m->position_lock_style() == AudioTime) {
                                const TempoSection* t = &tempo_section_at_minute_locked (metrics, minute_at_frame (m->frame() - 1));
-                               const double nascent_m_minute = t->minute_at_pulse (m->pulse());
+                               const framepos_t nascent_m_frame = frame_at_minute (t->minute_at_pulse (m->pulse()));
                                /* Here we check that a preceding section of music doesn't overlap a subsequent one.
                                */
-                               if (t && (nascent_m_minute > m->minute() || nascent_m_minute < 0.0)) {
+                               if (t && (nascent_m_frame > m->frame() || nascent_m_frame < 0)) {
                                        return false;
                                }
                        }