processSingleSampleRaw doubles frequency?


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]);
    //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:

Can anyone confirm / point out what I’ve missed?


You need two filter objects to process two channels of audio.


Well, would you just look at that :blush:

Much obliged, pflugshaupt