diff options
Diffstat (limited to 'libs/ardour/session_process.cc')
-rw-r--r-- | libs/ardour/session_process.cc | 12 |
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()) { |