summaryrefslogtreecommitdiff
path: root/libs/ardour
diff options
context:
space:
mode:
authornick_m <mainsbridge@gmail.com>2016-05-19 21:27:02 +1000
committernick_m <mainsbridge@gmail.com>2016-05-27 23:38:16 +1000
commit820e9a43f54d9ec4c403492527e2f0a136f76569 (patch)
tree126576f1cd62500ce7708dd481b13d1352cb3640 /libs/ardour
parentcfbc42cd3afe32ba189e3760ffeb33cabcd0e5ae (diff)
Tempo ramps - fix various sub-beat tempo line bugs.
- actual meter is taken into account now.
Diffstat (limited to 'libs/ardour')
-rw-r--r--libs/ardour/ardour/tempo.h2
-rw-r--r--libs/ardour/tempo.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/libs/ardour/ardour/tempo.h b/libs/ardour/ardour/tempo.h
index ec15993015..63f09d20be 100644
--- a/libs/ardour/ardour/tempo.h
+++ b/libs/ardour/ardour/tempo.h
@@ -311,7 +311,7 @@ class LIBARDOUR_API TempoMap : public PBD::StatefulDestructible
BBTPoint (const MeterSection& m, const Tempo& t, framepos_t f,
uint32_t b, uint32_t e, double func_c)
- : frame (f), meter (m.note_divisor(), m.divisions_per_bar()), tempo (t.beats_per_minute(), t.note_type()), c (func_c), bar (b), beat (e) {}
+ : frame (f), meter (m.divisions_per_bar(), m.note_divisor()), tempo (t.beats_per_minute(), t.note_type()), c (func_c), bar (b), beat (e) {}
Timecode::BBT_Time bbt() const { return Timecode::BBT_Time (bar, beat, 0); }
operator Timecode::BBT_Time() const { return bbt(); }
diff --git a/libs/ardour/tempo.cc b/libs/ardour/tempo.cc
index 07ff3166f2..bd33c8d3b7 100644
--- a/libs/ardour/tempo.cc
+++ b/libs/ardour/tempo.cc
@@ -1709,7 +1709,7 @@ TempoMap::beats_to_bbt_locked (const Metrics& metrics, const double& b) const
{
/* CALLER HOLDS READ LOCK */
MeterSection* prev_m = 0;
- const double beats = (b < 0.0) ? 0.0 : b;
+ const double beats = max (0.0, b);
for (Metrics::const_iterator i = metrics.begin(); i != metrics.end(); ++i) {
MeterSection* m = 0;