fix nasty bug in evaluation of final step of interpolated Curve values

git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@4084 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2008-11-03 07:41:21 +00:00
parent 81d2f16d00
commit 090c5993ee
1 changed files with 5 additions and 1 deletions

View File

@ -346,7 +346,11 @@ Curve::_get_vector (double x0, double x1, float *vec, int64_t veclen)
if (veclen > 1) {
dx = (hx - lx) / veclen;
/* note: if there are veclen elements in the output,
there are only veclen-1 steps between them.
*/
dx = (hx - lx) / (veclen-1);
for (i = 0; i < veclen; ++i, rx += dx) {
vec[i] = multipoint_eval (rx);