diff options
author | nick_m <mainsbridge@gmail.com> | 2016-04-17 04:26:19 +1000 |
---|---|---|
committer | nick_m <mainsbridge@gmail.com> | 2016-05-27 23:38:15 +1000 |
commit | 94e7e4e53b0678674ed7c9b2e899fda395a6e90d (patch) | |
tree | fd30f00e768c07ffd1e4b3e2dfe93f75280f4a32 /libs | |
parent | 4820a111802226350927270d4c505f129ee7ff48 (diff) |
Tempo ramps - before the first meter, the beat is 0.0
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/tempo.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/ardour/tempo.cc b/libs/ardour/tempo.cc index 978d4ed05a..7aa86d38b0 100644 --- a/libs/ardour/tempo.cc +++ b/libs/ardour/tempo.cc @@ -1542,6 +1542,9 @@ TempoMap::beat_at_frame_locked (const Metrics& metrics, const framecnt_t& frame) { const MeterSection& prev_m = meter_section_at_locked (metrics, frame); const TempoSection& ts = tempo_section_at_locked (metrics, frame); + if (frame < prev_m.frame()) { + return 0.0; + } return prev_m.beat() + (ts.pulse_at_frame (frame, _frame_rate) - prev_m.pulse()) * prev_m.note_divisor(); } |