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

DelayLine: Fix early wrapping in Lagrange interpolation

Co-authored-by: LeonPS <leonps531@gmail.com>
This commit is contained in:
attila 2023-08-09 18:23:11 +02:00
parent f0aacca62c
commit 0037e44a23
2 changed files with 2 additions and 2 deletions

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();
}

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();