mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-14 10:36:34 +01:00
Fix whitespace.
git-svn-id: svn://localhost/ardour2/branches/3.0@5885 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
f68f8839a5
commit
653a487bbd
1 changed files with 25 additions and 25 deletions
|
|
@ -264,42 +264,42 @@ Curve::_get_vector (double x0, double x1, float *vec, int32_t veclen)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (npoints == 1 ) {
|
if (npoints == 1 ) {
|
||||||
|
|
||||||
for (i = 0; i < veclen; ++i) {
|
for (i = 0; i < veclen; ++i) {
|
||||||
vec[i] = _list.events().front()->value;
|
vec[i] = _list.events().front()->value;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (npoints == 2) {
|
if (npoints == 2) {
|
||||||
|
|
||||||
/* linear interpolation between 2 points */
|
/* linear interpolation between 2 points */
|
||||||
|
|
||||||
/* XXX I'm not sure that this is the right thing to
|
/* XXX I'm not sure that this is the right thing to
|
||||||
do here. but its not a common case for the envisaged
|
do here. but its not a common case for the envisaged
|
||||||
uses.
|
uses.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (veclen > 1) {
|
if (veclen > 1) {
|
||||||
dx = (hx - lx) / (veclen - 1) ;
|
dx = (hx - lx) / (veclen - 1) ;
|
||||||
} else {
|
} else {
|
||||||
dx = 0; // not used
|
dx = 0; // not used
|
||||||
}
|
}
|
||||||
|
|
||||||
double slope = (_list.events().back()->value - _list.events().front()->value)/
|
double slope = (_list.events().back()->value - _list.events().front()->value)/
|
||||||
(_list.events().back()->when - _list.events().front()->when);
|
(_list.events().back()->when - _list.events().front()->when);
|
||||||
double yfrac = dx*slope;
|
double yfrac = dx*slope;
|
||||||
|
|
||||||
vec[0] = _list.events().front()->value + slope * (lx - _list.events().front()->when);
|
vec[0] = _list.events().front()->value + slope * (lx - _list.events().front()->when);
|
||||||
|
|
||||||
for (i = 1; i < veclen; ++i) {
|
for (i = 1; i < veclen; ++i) {
|
||||||
vec[i] = vec[i-1] + yfrac;
|
vec[i] = vec[i-1] + yfrac;
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_dirty) {
|
if (_dirty) {
|
||||||
solve ();
|
solve ();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue