Game Development Reference
In-Depth Information
Table 11-1 . Differences between short sound effects played through
OpenAL and long audio played through AVAudioPlayer
Short Sound-Effects/
OpenAL
Long-Running Audio/AVAudi-
oPlayer
None or small delay, de-
pending on file size and
format
Playback Delay
Small delay if not preloaded
Any software-decodable
format, or any hardware
format if using hardware
Any software-decodable
format
Format on Disk
Decoding
During load
During playback
Entire file loaded and de-
compressed into memory
File streamed in real time
(very low memory usage)
Memory Use
Simultaneous
Playback
32 simultaneous effects
Limited only by CPU
Excellent with 1 track (hard-
ware decoding). Still good
with 2 or a few tracks, but ad-
ditional tracks tax the CPU
significantly.
Playback Per-
formance
Good
Looped Play-
back
Yes (specific number of loops,
unlimited loops, or off)
Yes (on or off)
Panning
Yes (mono files only)
Yes
Positional Audio
Yes (mono files only)
No
Modify Pitch
Yes
No
Audio Power
Metering
No
Yes
44 or 22 kHz sample rate
with 16 bits per sample.
Uncompressed PCM.
Prefer mono. Containers:
.caf, .aiff or .wav. Dura-
tion: a fraction of a second
to a few seconds.
MP3 or AAC encoding, vari-
able or constant bitrate
between 80 kbps to 192 kbps.
Mono or stereo. Containers:
mp3, m4a, mp4. Duration: a
few seconds to several
minutes.
Recommended
Formats
Search WWH ::




Custom Search