13
0

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
This commit is contained in:
Paul Davis 2011-12-22 20:48:37 +00:00
parent ed2beaffee
commit ceaf76b505

View File

@ -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;