There is a round-off error in setValueCurveAtTime. When calling setValueCurveAtTime(curve, 0.0, 0.3) with a sample rate of 44100 and the curve data being sample-frame spaced of exactly the right length, the output has one sample duplicated, causing the rest of the values to be shifted. This is caused by a roundoff error at the line: unsigned curveIndex = static_cast<unsigned>(curveVirtualIndex); In this particular example, curveVirtualIndex = 895.9999 instead of 896 due to roundoff. The curveIndex is set to 895 which causes curve[895] to be output. But it was already output the previous time, so the output is duplicated and the output has the curve values shifted by one. Rounding curveVirtualIndex instead of truncating fixes this.
It might be easiest to fix this in bug 77666, which is how this error was found.
This was fixed in bug 77666. Closing this out now.