From ba3ae54f516fc447ad1828cf99ca22d352189c71 Mon Sep 17 00:00:00 2001 From: nick_m Date: Tue, 22 Mar 2016 02:55:24 +1100 Subject: [PATCH] Tempo ramps - clean up negative beat handling in beats_to_bbt_locked () --- libs/ardour/tempo.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/ardour/tempo.cc b/libs/ardour/tempo.cc index 549bac465d..ee66f4015d 100644 --- a/libs/ardour/tempo.cc +++ b/libs/ardour/tempo.cc @@ -1599,11 +1599,11 @@ TempoMap::beats_to_bbt (const double& beats) } Timecode::BBT_Time -TempoMap::beats_to_bbt_locked (const Metrics& metrics, const double& beats) const +TempoMap::beats_to_bbt_locked (const Metrics& metrics, const double& b) const { /* CALLER HOLDS READ LOCK */ - MeterSection* prev_ms = 0; + const double beats = (b < 0.0) ? 0.0 : b; uint32_t accumulated_bars = 0; double accumulated_beats = 0.0;