Hello all.
I am trying to implement the dsp:NoiseGate in the processor of an audio plug in.
In the prepareToPlay() method I have the following:
juce::dsp::ProcessSpec spec;
spec.sampleRate = sampleRate;
spec.maximumBlockSize = samplesPerBlock;
spec.numChannels = 1;
noiseGate.prepare(spec);
noiseGate.prepare(spec);
noiseGate.setThreshold(-1.0); //50
noiseGate.setAttack(5.0);
noiseGate.setRelease(17.0);
noiseGate.setRatio(1.0);
In the processBlock() I put the following:
juce::dsp::AudioBlock<float> block{buffer};
juce::dsp::ProcessContextReplacing<float> context{ block };
noiseGate.process(context);
This compiles but when running an exception appears triggered by the function processSample. The debugger ends on the line:
jassert (isPositiveAndBelow (channel, yold.size()));
Any suggestions?