Browse Source

Fix to the LagrangeInterpolator when working with extreme ratios.

tags/2021-05-28
jules 10 years ago
parent
commit
c2cbc78b5f
1 changed files with 8 additions and 2 deletions
  1. +8
    -2
      modules/juce_audio_basics/effects/juce_LagrangeInterpolator.cpp

+ 8
- 2
modules/juce_audio_basics/effects/juce_LagrangeInterpolator.cpp View File

@@ -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…
Cancel
Save