Playing Audio with the iPhone SDK
There are several ways to play audio with using the iPhone SDK:
1. System Sound Services
2. Audio Queue Services
3. OpenAL
4. AVAudioPlayer
Before I finally settled on one, I went up a few wrong paths. Let me give you some advice - if you want to play sounds in your none-game iPhone application, the best route to go is to use the Audio Queue Services. Yes, the documentation claims it is complicated, but the advantages outweigh the minimal extra complexity.
You should pick this technology because of the SpeakSound sample. This sample has pre-built classes that demonstrate an AudioPlayer and an AudioRecorder. You can simply copy these classes into your project, make a few small changes, and you can not only playback, you can also record. It took me only about 15 minutes to integrate this into my app.
The System Sound Services did not work for me, seemingly because it requires some special audio formats. OpenAL is complicated, and seems to be the Audio Equivalent of OpenGL, and theAVAudioPlayer is only available in iPhone SDK 2.2.
