diff options
author | Robin Gareus <robin@gareus.org> | 2012-11-07 03:17:55 +0000 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2012-11-07 03:17:55 +0000 |
commit | a8cf2aa4f95f1b6c81b5d1e970623c8cfcf0c584 (patch) | |
tree | 9664b92b3f0f7d1c6cc2fe770ecace136c683761 | |
parent | cb57b954809c5fd7db06f0bdf10e219355b05248 (diff) |
fix required-sample count for cubic interpolation.
I have not proved if the iterative process in
CubicInterpolation::interpolate() is identical to
(nframes * fabs(_actual_speed)), however ceil()
of it is empirically always larger.
Also, the cubic interpolation needs +2 samples.
Ardour3: Too close to call :)
git-svn-id: svn://localhost/ardour2/branches/3.0@13392 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | libs/ardour/audio_diskstream.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/ardour/audio_diskstream.cc b/libs/ardour/audio_diskstream.cc index 3345a00b42..2d2d3d252f 100644 --- a/libs/ardour/audio_diskstream.cc +++ b/libs/ardour/audio_diskstream.cc @@ -578,7 +578,7 @@ AudioDiskstream::process (framepos_t transport_frame, pframes_t nframes, framecn /* no varispeed playback if we're recording, because the output .... TBD */ if (rec_nframes == 0 && _actual_speed != 1.0f) { - necessary_samples = (framecnt_t) floor ((nframes * fabs (_actual_speed))) + 1; + necessary_samples = (framecnt_t) ceil ((nframes * fabs (_actual_speed))) + 2; } else { necessary_samples = nframes; } |