7

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.

Community
  • 1
  • 1
Bijoy Thangaraj
  • 5,434
  • 4
  • 43
  • 70
  • the problem is, if I send you my application which does the same thing, it won't help you because it is a very complex thing and you should analyse the workflow by yourself to understand it. – holex Aug 30 '12 at 17:22
  • by the way, I've analysed **[this sample project](http://developer.apple.com/library/ios/#samplecode/SpeakHere/Introduction/Intro.html#//apple_ref/doc/uid/DTS40007802)** to understand the process. it was more than enough for me, to analyse it it took 2 or 3 days for me but I'm not a genius. of course I've read the full **[Audio Session Programming Guide](http://developer.apple.com/library/ios/#documentation/Audio/Conceptual/AudioSessionProgrammingGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40007875-CH1-SW1)** as well. – holex Aug 30 '12 at 17:28

1 Answers1

5

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

hotpaw2
  • 70,107
  • 14
  • 90
  • 153
  • I have the source code for aurioTouch. Can you tell me where I can look for in that so that I can get some idea. For now, I just want to implement a method like `playSound:` and be able to record that. – Bijoy Thangaraj Aug 31 '12 at 03:32
  • could you give me the sample aurioTouch. Thanks in advance – RSM Nov 09 '13 at 13:21