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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user