2

I am trying to develop an iOS app which reads sound from the microphone, apply some effects and play it through the headset instantly, may be with some acceptable delay.

Is this possible? As a first step, i am trying to play the sound received from microphone in my headsets at the same time, but struggling to do so...

I was able to record the sound, save it and then play it easily. Relevant questions, articles couldn't be found easily. Any ideas, links are much appreciated

I did check Apple's aurioTouch. I couldn't find simultaneous record and play of same signal.

vivin
  • 992
  • 1
  • 8
  • 24

1 Answers1

0

Request the shortest buffers possible using audio session APIs (less than 6 mS is possible on most iOS devices). Then feed the raw audio samples you get from RemoteIO recording callbacks to the buffers in the RemoteIO play callbacks, possibly using a lock free circular fifo in between.

hotpaw2
  • 70,107
  • 14
  • 90
  • 153
  • Can you please provide any code sample for Swift ? There are tonnes of example in Objective-C, but none of Swift. @hotpaw2 – Partho Biswas May 01 '16 at 07:56
  • See Swift Audio Unit code here: http://stackoverflow.com/questions/36968813/how-to-record-and-play-audio-simultaneously-in-ios-using-swift – hotpaw2 May 01 '16 at 22:45