What’s the difference between the Apple audio frameworks?

I made a brief graphical overview of Core Audio and its (containing) frameworks:

Audio APIs in iOS

The framework closest to the hardware is Audio Unit. Based on that there is OpenAL and AudioToolbox with AudioQueue. On top, you can find the Media Player and AVFoundation (Audio & Video) frameworks.

Now it depends on what you want to do: just a small recording, use AVFoundation, which is the easiest one to use. (Media Player has no options for recording, it is – as the name says – just a media player.)

Do you want to do serious real-time signal processing? Use Audio Unit. But believe me, this is the hardest way. 🙂

With iOS 8.0 Apple introduced AVAudioEngine, an Objective-C/Swift based audio graph system in AV Foundation. This encapsulates some dirty C-stuff from Audio Units. Due to the complexity of Audio Unit it is maybe worth a look.

Further readings in the Apple Documentation:

  • Core Audio Overview: Introduction
  • Multimedia Programming Guide
  • Audio & Video Starting Point

Leave a Comment