mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Fix to the LagrangeInterpolator when working with extreme ratios.
This commit is contained in:
parent
272c0a254d
commit
c2cbc78b5f
1 changed files with 8 additions and 2 deletions
|
|
@ -87,7 +87,10 @@ int LagrangeInterpolator::process (const double actualRatio, const float* in,
|
|||
|
||||
if (numOut >= 4)
|
||||
{
|
||||
memcpy (lastInputSamples, in + (numOut - 4), 4 * sizeof (float));
|
||||
const float* end = in + numOut;
|
||||
|
||||
for (int i = 0; i < 4; ++i)
|
||||
lastInputSamples[i] = *--end;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -152,7 +155,10 @@ int LagrangeInterpolator::processAdding (const double actualRatio, const float*
|
|||
|
||||
if (numOut >= 4)
|
||||
{
|
||||
memcpy (lastInputSamples, in + (numOut - 4), 4 * sizeof (float));
|
||||
const float* end = in + numOut;
|
||||
|
||||
for (int i = 0; i < 4; ++i)
|
||||
lastInputSamples[i] = *--end;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue