From: Paul Davis Date: Thu, 22 Dec 2011 20:48:37 +0000 (+0000) Subject: switch over audio_unit.cc to use divisions_per_bar() not beats_per_bar(). not sure... X-Git-Tag: 3.0-beta2~139 X-Git-Url: https://git.carlh.net/gitweb/?a=commitdiff_plain;h=ceaf76b5051ae9d3aba9de2175397c7d6796e77a;p=ardour.git switch over audio_unit.cc to use divisions_per_bar() not beats_per_bar(). not sure how this was missed git-svn-id: svn://localhost/ardour2/branches/3.0@11058 d708f5d6-7413-0410-9779-e7cbd77b26cf --- diff --git a/libs/ardour/audio_unit.cc b/libs/ardour/audio_unit.cc index dc8a6eabf4..d6348af2e3 100644 --- a/libs/ardour/audio_unit.cc +++ b/libs/ardour/audio_unit.cc @@ -1418,7 +1418,7 @@ AUPlugin::get_beat_and_tempo_callback (Float64* outCurrentBeat, if (outCurrentBeat) { float beat; - beat = metric.meter().beats_per_bar() * bbt.bars; + beat = metric.meter().divisions_per_bar() * bbt.bars; beat += bbt.beats; beat += bbt.ticks / Timecode::BBT_Time::ticks_per_bar_division; *outCurrentBeat = beat; @@ -1467,7 +1467,7 @@ AUPlugin::get_musical_time_location_callback (UInt32* outDeltaSampleOffsetToNe } if (outTimeSig_Numerator) { - *outTimeSig_Numerator = (UInt32) lrintf (metric.meter().beats_per_bar()); + *outTimeSig_Numerator = (UInt32) lrintf (metric.meter().divisions_per_bar()); } if (outTimeSig_Denominator) { *outTimeSig_Denominator = (UInt32) lrintf (metric.meter().note_divisor()); @@ -1477,12 +1477,12 @@ AUPlugin::get_musical_time_location_callback (UInt32* outDeltaSampleOffsetToNe /* beat for the start of the bar. 1|1|0 -> 1 - 2|1|0 -> 1 + beats_per_bar - 3|1|0 -> 1 + (2 * beats_per_bar) + 2|1|0 -> 1 + divisions_per_bar + 3|1|0 -> 1 + (2 * divisions_per_bar) etc. */ - *outCurrentMeasureDownBeat = 1 + metric.meter().beats_per_bar() * (bbt.bars - 1); + *outCurrentMeasureDownBeat = 1 + metric.meter().divisions_per_bar() * (bbt.bars - 1); } return noErr; @@ -1551,7 +1551,7 @@ AUPlugin::get_transport_state_callback (Boolean* outIsPlaying, _session.tempo_map().bbt_time_with_metric (loc->start(), bbt, metric); float beat; - beat = metric.meter().beats_per_bar() * bbt.bars; + beat = metric.meter().divisions_per_bar() * bbt.bars; beat += bbt.beats; beat += bbt.ticks / Timecode::BBT_Time::ticks_per_bar_division; @@ -1563,7 +1563,7 @@ AUPlugin::get_transport_state_callback (Boolean* outIsPlaying, _session.tempo_map().bbt_time_with_metric (loc->end(), bbt, metric); float beat; - beat = metric.meter().beats_per_bar() * bbt.bars; + beat = metric.meter().divisions_per_bar() * bbt.bars; beat += bbt.beats; beat += bbt.ticks / Timecode::BBT_Time::ticks_per_bar_division;