From 613ff660422bff56c606925dce8d464a89076749 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 17 Aug 2016 17:17:00 +0200 Subject: [PATCH] fix ramped BPM reporting to AU and VST plugins --- libs/ardour/audio_unit.cc | 2 +- libs/ardour/session_vst.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/ardour/audio_unit.cc b/libs/ardour/audio_unit.cc index 5c324b0be2..85bfc51a6d 100644 --- a/libs/ardour/audio_unit.cc +++ b/libs/ardour/audio_unit.cc @@ -1825,7 +1825,7 @@ AUPlugin::get_beat_and_tempo_callback (Float64* outCurrentBeat, } if (outCurrentTempo) { - *outCurrentTempo = floor (metric.tempo().beats_per_minute()); + *outCurrentTempo = floor (session->tempo_map().tempo_at_frame (transport_frame + input_offset).beats_per_minute()); } return noErr; diff --git a/libs/ardour/session_vst.cc b/libs/ardour/session_vst.cc index 7b52b3cdf4..2a31592076 100644 --- a/libs/ardour/session_vst.cc +++ b/libs/ardour/session_vst.cc @@ -209,7 +209,7 @@ intptr_t Session::vst_callback ( const TempoMetric& tm (session->tempo_map().metric_at (now)); if (value & (kVstTempoValid)) { - const Tempo& t (tm.tempo()); + const Tempo& t (session->tempo_map().tempo_at_frame (now)); timeinfo->tempo = t.beats_per_minute (); newflags |= (kVstTempoValid); }