Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Playback and Recording simultaneously using Core Audio in iOS

I need to play and record simultaneously using Core Audio. I really do not want to use AVFoundation API (AVAudioPlayer + AVAudioRecorder) to do this as I am making a music app and cannot have any latency issues.

I've looked at the following source code from Apple:
aurioTouch
MixerHost

I've already looked into the following posts:
iOS: Sample code for simultaneous record and playback
Record and play audio Simultaneously

I am still not clear on how I can do playback and record the same thing simultaneously using Core Audio. Any pointers towards how I can achieve this will be greatly appreciable. Any pointers to any sample source code will also be of great help.

like image 491
Bijoy Thangaraj Avatar asked Aug 30 '12 17:08

Bijoy Thangaraj


1 Answers

The RemoteIO Audio Unit can be used for simultaneous record and play. There are plenty of examples of recording using RemoteIO (aurioTouch) and playing using RemoteIO. Just enable both unit input and unit output, and handle both buffer callbacks. See an example here

like image 141
hotpaw2 Avatar answered Oct 03 '22 17:10

hotpaw2