diff options
author | Robin Gareus <robin@gareus.org> | 2016-05-26 10:44:13 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-05-26 10:44:13 +0200 |
commit | eadc2ca88a754ac5e7ba960b2db4c01cc40d887a (patch) | |
tree | 3fa593e2087aec1ee2c0b06837f44481ff3a064b /libs/ardour/audio_unit.cc | |
parent | 602344f0c5cfd97b01c900252c01514457df1c7f (diff) |
fix maths thinko
Diffstat (limited to 'libs/ardour/audio_unit.cc')
-rw-r--r-- | libs/ardour/audio_unit.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/ardour/audio_unit.cc b/libs/ardour/audio_unit.cc index 37c96a30ca..15b63c8f37 100644 --- a/libs/ardour/audio_unit.cc +++ b/libs/ardour/audio_unit.cc @@ -1767,10 +1767,10 @@ AUPlugin::get_beat_and_tempo_callback (Float64* outCurrentBeat, if (outCurrentBeat) { const double ppq_scaling = metric.meter().note_divisor() / 4.0; float beat; - beat = metric.meter().divisions_per_bar() * (bbt.bars - 1) * ppq_scaling; - beat += (bbt.beats - 1) * ppq_scaling;; + beat = metric.meter().divisions_per_bar() * (bbt.bars - 1); + beat += (bbt.beats - 1); beat += bbt.ticks / Timecode::BBT_Time::ticks_per_beat; - *outCurrentBeat = beat; + *outCurrentBeat = beat * ppq_scaling; } if (outCurrentTempo) { |