From 466cbecabac97abff86c4a9d4da3c9a30d4128f3 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 31 Oct 2017 22:01:46 +0100 Subject: [PATCH] Fix samples-moved (and invalid use of not initialized CubicInterpolation) --- libs/ardour/session_process.cc | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/libs/ardour/session_process.cc b/libs/ardour/session_process.cc index fe946f865d..7acc3a57da 100644 --- a/libs/ardour/session_process.cc +++ b/libs/ardour/session_process.cc @@ -433,16 +433,9 @@ Session::process_with_events (pframes_t nframes) } } - if (_transport_speed == 1.0) { - samples_moved = (samplecnt_t) nframes; - } else { - /* use a cubic midi interpolation to compute the number of - * samples we will move at the current speed. - */ - CubicInterpolation interp; - interp.set_speed (_transport_speed); - samples_moved = interp.distance (nframes); - } + assert (_transport_speed == 0 || _transport_speed == 1.0 || _transport_speed == -1.0); + + samples_moved = (samplecnt_t) nframes * _transport_speed; end_sample = _transport_sample + samples_moved;