summaryrefslogtreecommitdiff
path: root/libs/ardour/session_process.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2017-10-02 12:43:20 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2017-10-02 12:46:12 -0400
commit3f48d00081aa2f34e42d4219c01757b6f27392e3 (patch)
tree370315d3091f6990952b408320ec7a2455c26a42 /libs/ardour/session_process.cc
parent45b1f6f6b8de94c90f0fb93a18062d02fdb62ca9 (diff)
use new CubicInterpolation API
Diffstat (limited to 'libs/ardour/session_process.cc')
-rw-r--r--libs/ardour/session_process.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/libs/ardour/session_process.cc b/libs/ardour/session_process.cc
index 32c8f99734..d16f7d3b0c 100644
--- a/libs/ardour/session_process.cc
+++ b/libs/ardour/session_process.cc
@@ -436,9 +436,12 @@ Session::process_with_events (pframes_t nframes)
if (_transport_speed == 1.0) {
samples_moved = (samplecnt_t) nframes;
} else {
- interpolation.set_target_speed (_target_transport_speed);
- interpolation.set_speed (_transport_speed);
- samples_moved = (samplecnt_t) interpolation.interpolate (0, nframes, 0, 0);
+ /* 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);
}
end_sample = _transport_sample + samples_moved;
@@ -887,9 +890,8 @@ Session::process_without_events (pframes_t nframes)
if (_transport_speed == 1.0) {
samples_moved = (samplecnt_t) nframes;
} else {
- interpolation.set_target_speed (_target_transport_speed);
interpolation.set_speed (_transport_speed);
- samples_moved = (samplecnt_t) interpolation.interpolate (0, nframes, 0, 0);
+ samples_moved = interpolation.distance (nframes);
}
if (!_exporting && !timecode_transmission_suspended()) {