I'm starting to write an AUv3 audio extension and follow the template in Xcode 11.3 that did all the heavy lifting. The extension works well when loaded to other hosts! Now I want to use my own extension in my app and simple play an audio file through, but I have trouble and tearing my hair since a few days (and nights) on how to access the parameters.
I use the AVplayer and AVengine and instantiate the AudioUnitExtension like this:
// instantiate AudioUnit as AVAudioUnit
[AVAudioUnit instantiateWithComponentDescription:audioDescription options:1 completionHandler:^(AVAudioUnit * audioUnit, NSError *error) { ... do more stuff here}];
To my surprise the createAudioUnitWithComponentDescription method in my extension is not called?! But when I connect it to the AVengine:
[self->_engine attachNode:self->_AV_AudioUnit];
The audio is passing and the effect is applied but in the AVAudioUnit there is no parameter tree so I can not change any processing parameters. It seams that AVAudioUnit != AUAudioUnit and does not have a parameter tree. But the AVengine only allows AVAudioUnits to work with!
I've looked through Apples example and web but could not find any helpful ... would be great if someone could point me to a direction how to set this up!