2
votes

Are there direct calls to the audio unit so that I don't have to depend on the system callbacks-input and render callbacks(I can mimic this with a timer). For example, like there is AudioUnitRender to pull data from the audio unit, is there another API to push data to the audio unit?

2
Might be a slightly better question if you removed the "RemoteIO" requirement...Hari Honor
Thanks for the suggestion, edited it.Namratha

2 Answers

1
votes

While I'm not aware of a specific push-like call in the CoreAudio API, you can easily accomplish this by doing your DSP processing in a separate C function which takes floating point buffers passed into it. This way, the render callback can do the hard work there, and you can also call the function manually if you need to do push-based processing.

0
votes

The audio units behavior is the pull model. The output request data to play and if it has it, then it plays.

The common way to start recording is to call Render within the output callback. The Render will get you the data from the recorder which can be played or just save your recorded data to somewhere else and set the player to play silence.