fix vari-speed phase (when used for calculation only)
and clarify an old comment.
This commit is contained in:
parent
1d972d05c5
commit
4864833669
@ -135,17 +135,18 @@ CubicInterpolation::interpolate (int channel, framecnt_t nframes, Sample *input,
|
|||||||
inm1 = input[i];
|
inm1 = input[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
i = floor(distance);
|
||||||
|
phase[channel] = distance - floor(distance);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
/* used to calculate play-distance with acceleration (silent roll)
|
||||||
/* not sure that this is ever utilized - it implies that one of the input/output buffers is missing */
|
* (use same algorithm as real playback for identical rounding/floor'ing)
|
||||||
|
*/
|
||||||
for (framecnt_t outsample = 0; outsample < nframes; ++outsample) {
|
for (framecnt_t outsample = 0; outsample < nframes; ++outsample) {
|
||||||
distance += _speed + acceleration;
|
distance += _speed + acceleration;
|
||||||
}
|
}
|
||||||
|
i = floor(distance);
|
||||||
}
|
}
|
||||||
|
|
||||||
i = floor(distance);
|
|
||||||
phase[channel] = distance - floor(distance);
|
|
||||||
|
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user