Audio Toolkit (AudioToolbox Framework)
It plays audio but it can’t change pitch or loop.

AVAudioPlayer (AVFoundation Framework)
File-based playback of DRM-free audio in Apple-supported codecs.

Audio Queue Services (AudioToolbox Framework)
It can loop audio but it is painful to re-read the data from the file to adjust the playback frequency. C-based API for buffered recording and playback of audio. It would work for a net radio player, or your own formats and/or DRM/encryption schemes (decrypt in memory before handing off to the queue). Inherent latency due to the use of buffers.

OpenAL
Sample can be pre-loaded. It is easy to adjust the frequency and looping. However, quality is suffered when you stop the looping. The built-in 3D positional audio mixer is too CPU-intensive.

Look for example codes “SoundEngine.h”, “CrashLanding” or “TouchFighter” that use OpenAL.

AudioUnits (aka RemoteIO)
RemoteIO is poorly documented and extremely difficult to implement, similar to AudioQueue Services. Low-level C-based API. Very low latency, as little as 29 milliseconds. Mixing, effects, near-direct access to input and output hardware.

Leave a Reply