1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Fix to LagrangeInterpolator

This commit is contained in:
jules 2013-06-04 14:29:52 +01:00
parent f8d2fbc5c4
commit 5af815e541

View file

@ -126,8 +126,8 @@ int LagrangeInterpolator::process (const double actualRatio, const float* in,
pos += 1.0;
}
*out++ = LagrangeHelpers::valueAtOffset (lastInputSamples, 1.0f - (float) pos);
pos -= actualRatio;
*out++ = LagrangeHelpers::valueAtOffset (lastInputSamples, 1.0f - (float) pos);
}
}
@ -191,8 +191,8 @@ int LagrangeInterpolator::processAdding (const double actualRatio, const float*
pos += 1.0;
}
*out++ += gain * LagrangeHelpers::valueAtOffset (lastInputSamples, 1.0f - (float) pos);
pos -= actualRatio;
*out++ += gain * LagrangeHelpers::valueAtOffset (lastInputSamples, jmax (0.0f, 1.0f - (float) pos));
}
}