|
|
@@ -40,8 +40,9 @@ DelayLine<SampleType, InterpolationType>::DelayLine (int maximumDelayInSamples) |
|
|
|
{
|
|
|
|
jassert (maximumDelayInSamples >= 0);
|
|
|
|
|
|
|
|
totalSize = jmax (4, maximumDelayInSamples + 1);
|
|
|
|
sampleRate = 44100.0;
|
|
|
|
|
|
|
|
setMaximumDelayInSamples (maximumDelayInSamples);
|
|
|
|
}
|
|
|
|
|
|
|
|
//==============================================================================
|
|
|
@@ -81,6 +82,15 @@ void DelayLine<SampleType, InterpolationType>::prepare (const ProcessSpec& spec) |
|
|
|
reset();
|
|
|
|
}
|
|
|
|
|
|
|
|
template <typename SampleType, typename InterpolationType>
|
|
|
|
void DelayLine<SampleType, InterpolationType>::setMaximumDelayInSamples (int maxDelayInSamples)
|
|
|
|
{
|
|
|
|
jassert (maxDelayInSamples >= 0);
|
|
|
|
totalSize = jmax (4, maxDelayInSamples + 1);
|
|
|
|
bufferData.setSize ((int) bufferData.getNumChannels(), totalSize, false, false, true);
|
|
|
|
reset();
|
|
|
|
}
|
|
|
|
|
|
|
|
template <typename SampleType, typename InterpolationType>
|
|
|
|
void DelayLine<SampleType, InterpolationType>::reset()
|
|
|
|
{
|
|
|
|