Using IIRFilter::processSingleSampleRaw
vs IIRFilter::processSamples
appears to change the frequency
I’m not really sure how I could be misusing this, but I’d be surprised if I’m the first person to hit it.
For example:
if (*processSingle){
//this path appears to double the affected frequency
for (int x = 0; x < buffer.getNumSamples(); x++) {
leftData[x] = filterAPeak.processSingleSampleRaw (leftData[x]);
rightData[x] = filterAPeak.processSingleSampleRaw (rightData[x]);
}
}
else
{
//This works as expected
filterAPeak.processSamples (leftData, buffer.getNumSamples());
filterAPeak.processSamples (rightData, buffer.getNumSamples());
}
First path produces:
Second path produces:
IIRCoefficients are the same in both cases. Full test case code is at: https://gitlab.com/dave.ursa/PeakFilterIssue
Can anyone confirm / point out what I’ve missed?