Search code examples
audiocore-audioavaudioengineios13augraph

Does AUGraph deprecation means no more audio render callbacks?


I have an app with an elaborated render callback that I doubt could do with AVAudioEngine.

Anyway to use my AUGraph render callback ( with multiple buses ) with AVAudioEngine ?

Any sample code ?


Solution

  • The Audio Unit API is not deprecated, only AUGraph which is presumably built on top of it.

    Make connections using AudioUnitSetProperty with kAudioUnitProperty_MakeConnection with an AudioUnitConnection struct.

    Start and stop your output unit with AudioOutputUnitStart and AudioOutputUnitStop.

    Set a render callback using AudioUnitSetProperty and kAudioUnitProperty_SetRenderCallback with an AURenderCallbackStruct

    There's really not all that much that AUGraph gives you other than a little bookkeeping and a simpler connection syntax.