mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 16:46:35 +01:00
Make sure that _get_vector writes a value to the output array even when veclen == 1. Fixes #3461.
git-svn-id: svn://localhost/ardour2/branches/3.0@7808 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
e47d463309
commit
a212e7eec9
1 changed files with 7 additions and 6 deletions
|
|
@ -264,7 +264,7 @@ Curve::_get_vector (double x0, double x1, float *vec, int32_t veclen)
|
|||
return;
|
||||
}
|
||||
|
||||
if (npoints == 1 ) {
|
||||
if (npoints == 1) {
|
||||
|
||||
for (i = 0; i < veclen; ++i) {
|
||||
vec[i] = _list.events().front()->value;
|
||||
|
|
@ -308,12 +308,13 @@ Curve::_get_vector (double x0, double x1, float *vec, int32_t veclen)
|
|||
rx = lx;
|
||||
|
||||
if (veclen > 1) {
|
||||
dx = (hx - lx) / (veclen - 1);
|
||||
} else {
|
||||
dx = 0;
|
||||
}
|
||||
|
||||
dx = (hx - lx) / (veclen-1);
|
||||
|
||||
for (i = 0; i < veclen; ++i, rx += dx) {
|
||||
vec[i] = multipoint_eval (rx);
|
||||
}
|
||||
for (i = 0; i < veclen; ++i, rx += dx) {
|
||||
vec[i] = multipoint_eval (rx);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue