summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2008-11-03 07:41:21 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2008-11-03 07:41:21 +0000
commit090c5993ee2b7a9962fa467a600c61562c2ff42e (patch)
tree5a1b8dd845bfc7dbb65d91fdbdf604546cfb2c81 /libs
parent81d2f16d00affd8dd49e237008f2457aa96edb74 (diff)
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
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/curve.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/ardour/curve.cc b/libs/ardour/curve.cc
index 249d84642b..c576c55d45 100644
--- a/libs/ardour/curve.cc
+++ b/libs/ardour/curve.cc
@@ -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);