diff options
author | nick_m <mainsbridge@gmail.com> | 2017-01-07 01:12:09 +1100 |
---|---|---|
committer | nick_m <mainsbridge@gmail.com> | 2017-01-07 01:12:09 +1100 |
commit | 4cb00905838ba6ae35317876ae8601a4076745ed (patch) | |
tree | ab0973876ce73bdff44d201c795e8f5f42e90748 /libs/ardour/tempo.cc | |
parent | bdb8cce6e3dffa283bae18ef993dda13df8070d4 (diff) |
fix some inactive tempi bugs
- no tempo curve for inactive tempi
- inactive and meter-locked tempi cannot be deleted.
Diffstat (limited to 'libs/ardour/tempo.cc')
-rw-r--r-- | libs/ardour/tempo.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libs/ardour/tempo.cc b/libs/ardour/tempo.cc index eadfe873a5..a7d976a9f8 100644 --- a/libs/ardour/tempo.cc +++ b/libs/ardour/tempo.cc @@ -743,6 +743,8 @@ TempoMap::TempoMap (framecnt_t fr) MeterSection *m = new MeterSection (0.0, 0.0, 0.0, start, _default_meter.divisions_per_bar(), _default_meter.note_divisor(), AudioTime, fr); t->set_initial (true); + t->set_locked_to_meter (true); + m->set_initial (true); /* note: frame time is correct (zero) for both of these */ @@ -2609,13 +2611,12 @@ TempoMap::set_active_tempi (const Metrics& metrics, const framepos_t& frame) TempoSection* t; if ((*i)->is_tempo()) { t = static_cast<TempoSection*> (*i); - if (t->initial()) { + if (t->locked_to_meter()) { t->set_active (true); - continue; } else if (t->position_lock_style() == AudioTime) { - if (t->active () && t->frame() < frame) { + if (t->frame() < frame) { t->set_active (false); - t->set_pulse (0.0); + t->set_pulse (-1.0); } else if (t->frame() > frame) { t->set_active (true); } else if (t->frame() == frame) { @@ -2806,7 +2807,7 @@ TempoMap::solve_map_minute (Metrics& imaginary, MeterSection* section, const dou if (section->initial()) { /* lock the first tempo to our first meter */ - if (!set_active_tempi (imaginary, section->frame_at_minute (minute))) { + if (!set_active_tempi (imaginary, frame_at_minute (minute))) { return false; } } |