I’m having trouble with IIRFilter in an iOS Audio Application.
I used the setCoefficients method on a slider change, but when I move the slider, I get crackling and then the app freezes and I get a Juce Assertion Failure:
Here is where I change the coefficients to correspond to the frequency slider:
I checked the assertion in juce_IIRFilter.cpp:
But I don’t see how it’s failing. I’ve set the range for the lpfSlider to be from 20 to 20k in the MainContentComponenet constructor here:
and from what I read, iOS audio data from the microphone is sampled at 44.1 kHz.
Here is where I define the global sample rate, fs, in prepareToPlay():
So why is this assertion failing?
Anyone know what’s going on here?