diff options
Diffstat (limited to 'libs/ardour/tempo.cc')
-rw-r--r-- | libs/ardour/tempo.cc | 10 |
1 files changed, 10 insertions, 0 deletions
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<TempoSection*> (*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<TempoSection*> (*i); + + if (!t->active()) { + continue; + } + if (prev_t && ((t->pulse() - prev_m->pulse()) * prev_m->note_divisor()) + prev_m->beat() > beat) { break; } |