Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Playing simple sound effects can be done by using System Audio Services. It is recommended that the sounds be short in duration. Here are the iOS guidelines:
Must be .caf, .aif, or .wav files
The audio data in the file must be in PCM or IMA/ADPCM (IMA4) format
The file’s audio duration must be less than 30 seconds
You will use this to play back three different sound files for wall collision, paddle collision, and scoring a point. I have already created a few sounds that you can integrate into the game that are available for download from http://oreilly.com/catalog/0636920018414 or at my website http://toddmoore.com/. The files are named wall.wav, paddle.wav, and score.wav. Once you have downloaded the ZIP file, decompress them, and drag them into your Xcode. When prompted, make sure the “Copy...” checkbox is selected, as shown in Figure 2-12, and click OK. The sound files are now included as part of the application bundle and you can access them from within the code.