diff --git a/libs/ardour/audio_unit.cc b/libs/ardour/audio_unit.cc index 230482551b..70d2853f8c 100644 --- a/libs/ardour/audio_unit.cc +++ b/libs/ardour/audio_unit.cc @@ -1760,9 +1760,8 @@ AUPlugin::get_beat_and_tempo_callback (Float64* outCurrentBeat, return kAudioUnitErr_CannotDoInCurrentContext; } - Timecode::BBT_Time bbt; TempoMetric metric = tmap.metric_at (_session.transport_frame() + input_offset); - tmap.bbt_time (_session.transport_frame() + input_offset, bbt); + Timecode::BBT_Time bbt = _session.tempo_map().bbt_at_frame (_session.transport_frame() + input_offset); if (outCurrentBeat) { const double ppq_scaling = metric.meter().note_divisor() / 4.0; @@ -1800,9 +1799,8 @@ AUPlugin::get_musical_time_location_callback (UInt32* outDeltaSampleOffsetToNe return kAudioUnitErr_CannotDoInCurrentContext; } - Timecode::BBT_Time bbt; TempoMetric metric = tmap.metric_at (_session.transport_frame() + input_offset); - tmap.bbt_time (_session.transport_frame() + input_offset, bbt); + Timecode::BBT_Time bbt = _session.tempo_map().bbt_at_frame (_session.transport_frame() + input_offset); if (outDeltaSampleOffsetToNextBeat) { if (bbt.ticks == 0) { @@ -1896,7 +1894,7 @@ AUPlugin::get_transport_state_callback (Boolean* outIsPlaying, if (outCycleStartBeat) { TempoMetric metric = tmap.metric_at (loc->start() + input_offset); - _session.tempo_map().bbt_time (loc->start(), bbt); + bbt = _session.tempo_map().bbt_at_frame (loc->start() + input_offset); float beat; beat = metric.meter().divisions_per_bar() * bbt.bars; @@ -1908,7 +1906,7 @@ AUPlugin::get_transport_state_callback (Boolean* outIsPlaying, if (outCycleEndBeat) { TempoMetric metric = tmap.metric_at (loc->end() + input_offset); - _session.tempo_map().bbt_time (loc->end(), bbt); + bbt = _session.tempo_map().bbt_at_frame (loc->end() + input_offset); float beat; beat = metric.meter().divisions_per_bar() * bbt.bars;