summaryrefslogtreecommitdiff
path: root/libs/ardour/session_process.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-10-31 22:01:46 +0100
committerRobin Gareus <robin@gareus.org>2017-10-31 22:01:46 +0100
commit466cbecabac97abff86c4a9d4da3c9a30d4128f3 (patch)
tree30f36b795b16b3b944ac1422dfb7b9b5c4c9d429 /libs/ardour/session_process.cc
parentf5c5adee6aa82514500366f75f1f53aaf317c064 (diff)
Fix samples-moved (and invalid use of not initialized CubicInterpolation)
Diffstat (limited to 'libs/ardour/session_process.cc')
-rw-r--r--libs/ardour/session_process.cc13
1 files 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;