In the snapToZero method on the Oversampling2TimesPolyphaseIIR oversampling engine in the new DSP module, there’s this following line:
Why does this line iterate through the number of channels in OversamplingEngine<SampleType>::buffer.getNumChannels(); but then try to read from the v1up buffer? Would it not make more sense to iterate through v1up.getNumChannels()?
I ask because I’m using the oversampling class with the PolyphaseIIR filter in a plugin of mine, and it’s failing auval during the 1-channel tests because v1up gets configured with 1 channel but OversamplingEngine<SampleType>::buffer.getNumChannels(); resolves to 2 channels during a call to snapToZero. Then a call to v1Up.getWritePointer(1) goes through and hits a jassert because v1Up doesn’t have a channel at index 1.
I am able to build and validate successfully using the FIR Equiripple filter, so I don’t think the issue has to do with how I’m configuring the oversampling processor, but surely I could be wrong.
I would say, the arguments in the constructor are swapped.
When the Oversampling2TimesPolyphaseIIR constructor calls it’s base class constructor, it calls OversamplingEngine<SampleType> (2, numChannels), but it is defined as: OversamplingEngine (size_t newNumChannels, size_t newFactor).
However, it seems to be fixed on develop, says git:
@daniel your last two links are not pointing to the same class. One is pointing to Oversampling2TimesPolyphaseIIR (on master), while the other one is pointing to Oversampling2TimesEquirippleFIR (on develop).