I want to record audio from an iPhone microphone and write those samples to a file. Looking at the documentation, it’s not clear to me if I can simply perform the write operation inside the render callback function of the Remote IO unit? Or if I instead need to attach a generic output AU and write the samples coming out of that unit(?) The latter implies more overhead in terms of setting up an AUGraph, AUNodes etc, so I’d prefer the former.
Share
You can do it in your Input Callback, using the ExtAudioFile API (and
ExtAudioFileWriteAsyncin particular). The “async” bit is what makes it viable in the realtime input callback.See this answer for more, as it’s quite a similar setup.
ExtAudioFileWriteAsync docs are here.