Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 ?

like image 858
Fischer Avatar asked Dec 31 '22 20:12

Fischer


1 Answers

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.

like image 190
dave234 Avatar answered Jan 31 '23 00:01

dave234