Fix samples-moved (and invalid use of not initialized CubicInterpolation)
authorRobin Gareus <robin@gareus.org>
Tue, 31 Oct 2017 21:01:46 +0000 (22:01 +0100)
committerRobin Gareus <robin@gareus.org>
Tue, 31 Oct 2017 21:01:46 +0000 (22:01 +0100)
libs/ardour/session_process.cc

index fe946f865d6f08307687ff17ed766d54c88f86a1..7acc3a57daf64483a033aa5691b638dbdf668f5f 100644 (file)
@@ -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;