From 9eeccf0c17094708996c3c491f265877b04199fe Mon Sep 17 00:00:00 2001 From: nick_m Date: Mon, 21 Dec 2015 07:14:10 +1100 Subject: Tempo ramps - port audio unit and midi clock slave. - untested. --- libs/ardour/audio_unit.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libs/ardour/audio_unit.cc') diff --git a/libs/ardour/audio_unit.cc b/libs/ardour/audio_unit.cc index 15b63c8f37..6a927680aa 100644 --- a/libs/ardour/audio_unit.cc +++ b/libs/ardour/audio_unit.cc @@ -1810,8 +1810,8 @@ AUPlugin::get_musical_time_location_callback (UInt32* outDeltaSampleOffsetToNe *outDeltaSampleOffsetToNextBeat = 0; } else { *outDeltaSampleOffsetToNextBeat = (UInt32) - floor (((Timecode::BBT_Time::ticks_per_beat - bbt.ticks)/Timecode::BBT_Time::ticks_per_beat) * // fraction of a beat to next beat - metric.tempo().frames_per_beat (_session.frame_rate())); // frames per beat + double beat_frac_to_next = (Timecode::BBT_Time::ticks_per_beat - bbt.ticks) / Timecode::BBT_Time::ticks_per_beat ; + tmap.frame_at_beat (tmap.beat_at_frame (_session.transport_frame() + input_offset) + beat_frac_to_next); } } -- cgit v1.2.3