You may get some other answers from the Core audio list, but it looks to me that you are setting up an AUGraph with the basic structure
// Parameters for the AULowpass unit
enum {
// Global, Hz, 10->(SampleRate/2), 6900
kLowPassParam_CutoffFrequency = 0,
// Global, dB, -20->40, 0
kLowPassParam_Resonance = 1
};
from AudioUnitParameters.h
If that is all you need, you don't need to do this in the callback, just make the connections and then manipulate the filter parameters.
On the other hand, to use the filter calculation you have in code, you don't need the effectAU, include the filter calculation in the callback (or in a branch of it) so that the samples you send to output have been updated depending on the filter effect.
You can feed the input of an AU with either a direction connection from another AUunit or with a callback, but its an either/or choice.
There is a lot of useful code in Tom Zicarelli's Audiograph example on Github
It's set up for iOS, but mostly will work on Mac as well with minimal modification. It has been extremely helpful in trying to get my audio graph projects to run properly.
I've made a few small changes to your AudioManager code. Once its working here, I'll send it back to you.
regards,
rob
On May 9, 2014, at 11:07 AM, herve.noury wrote:
Hello Robert,
Thanks so much for mailing.
I send you with this mail the XCode project. The voids, graph, and so on are written, but I do not understand how to get the audio input to filter it in the AURenderCallback. Thanks for your help!
Best regards,
Hervé
<TestPlayerAndFilter.zip>