Browse Source

DelayLine: Fix early wrapping in Lagrange interpolation

Co-authored-by: LeonPS <leonps531@gmail.com>
v7.0.9
attila 1 year ago
parent
commit
0037e44a23
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      modules/juce_dsp/processors/juce_DelayLine.cpp
  2. +1
    -1
      modules/juce_dsp/processors/juce_DelayLine.h

+ 1
- 1
modules/juce_dsp/processors/juce_DelayLine.cpp View File

@@ -86,7 +86,7 @@ template <typename SampleType, typename InterpolationType>
void DelayLine<SampleType, InterpolationType>::setMaximumDelayInSamples (int maxDelayInSamples)
{
jassert (maxDelayInSamples >= 0);
totalSize = jmax (4, maxDelayInSamples + 1);
totalSize = jmax (4, maxDelayInSamples + 2);
bufferData.setSize ((int) bufferData.getNumChannels(), totalSize, false, false, true);
reset();
}


+ 1
- 1
modules/juce_dsp/processors/juce_DelayLine.h View File

@@ -125,7 +125,7 @@ public:
For very short delay times, the result of getMaximumDelayInSamples() may
differ from the last value passed to setMaximumDelayInSamples().
*/
int getMaximumDelayInSamples() const noexcept { return totalSize - 1; }
int getMaximumDelayInSamples() const noexcept { return totalSize - 2; }
/** Resets the internal state variables of the processor. */
void reset();


Loading…
Cancel
Save