From 28058f630294f70830b08deff71d8287123c744d Mon Sep 17 00:00:00 2001 From: nick_m Date: Sat, 7 Jan 2017 02:25:42 +1100 Subject: [PATCH] more inactive tempi fixes. --- libs/ardour/tempo.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libs/ardour/tempo.cc b/libs/ardour/tempo.cc index 0ab0e4a3ed..bab4abd67f 100644 --- a/libs/ardour/tempo.cc +++ b/libs/ardour/tempo.cc @@ -1683,6 +1683,11 @@ TempoMap::minute_at_beat_locked (const Metrics& metrics, const double& beat) con for (Metrics::const_iterator i = metrics.begin(); i != metrics.end(); ++i) { if ((*i)->is_tempo()) { t = static_cast (*i); + + if (!t->active()) { + continue; + } + if (prev_t && ((t->pulse() - prev_m->pulse()) * prev_m->note_divisor()) + prev_m->beat() > beat) { break; } @@ -4079,6 +4084,11 @@ TempoMap::tempo_section_at_beat_locked (const Metrics& metrics, const double& be for (Metrics::const_iterator i = metrics.begin(); i != metrics.end(); ++i) { if ((*i)->is_tempo()) { t = static_cast (*i); + + if (!t->active()) { + continue; + } + if (prev_t && ((t->pulse() - prev_m->pulse()) * prev_m->note_divisor()) + prev_m->beat() > beat) { break; }