Diego Cuadros
Diego Cuadros

Reputation: 316

Is realtime audio processing possible in iOS?

So I'm planning to build an app that at the very least let's me use the mic on an iphone be converted into a balanced audio signal through the headphone jack. The problem is I'm not sure if getting mic input to the output is possible without a delay. I've looked into CoreAudio and AVFoundation, but it looks like one is getting deprecated soon and the other might be too high level to ever do what I need. I'm testing out AudioKit, but I've only run it in a simulator that's running on a virtual machine inside windows, so I might get much better results on an actual device (although I'm skeptical because the audio delay is about the same as when I monitor my microphone through windows).

Does anyone know any frameworks or literally anything that might make it possible to do real time audio processing without too noticeable of a delay? Is it even possible on iOS or is the OS overhead too big?

Literally any answer is appreciated.

Upvotes: 2

Views: 1307

Answers (1)

Jason Geyer
Jason Geyer

Reputation: 58

I'm doing real-time audio processing using AudioKit. There were a few hiccups, but I've been able to manage to add processing nodes to real-time mic recordings and output them to the speaker with virtually no delay.

A notable hiccup I ran into was the difference between a 'debug' build and a 'release' build in xcode. The release build takes longer to compile, but runs faster, thus reduces delay in the audiobuffer processing. My testing platform is an old ipad2 though, so you may not run into those issues if you're using more recent hardware.

Upvotes: 3

Related Questions