Game Development Reference
In-Depth Information
The word length
Word length is the amount of data in an individual sample. The longer the word
length, the more accurate the sample. Word size is measured in bits of data.
The number of bits used to represent a single audio wave (the word size) directly
affects the signal. Increasing a sample's word length by one bit doubles its possible
values; the practical limit of which is 24 bits, since that is the maximum that today's
sound equipment can detect.
Compression
Compression is a process to reduce the size of the stored audio file. There are three
basic types of compressions: uncompressed, lossless compression, and lossy com-
pression.
Uncompressed
An uncompressed (raw or PCM) audio file requires about a megabyte of storage per
second of playback. This format is generally used only for archiving original master
studio recordings.
Lossless compression
This format removes data that is generally unperceivable by audio equipment and
the listener. A good example is the FLAC format, which, while having a smaller space
footprint than PCM, is still too large to be used in the game development.
Lossy compression
This format sacrifices a varying amount of fidelity for a game-friendly space require-
ment. A typical example is the *.MP3 format which uses on an average about one
megabyte per minute of playback time. This is the format we will focus on in this
chapter.
Playback
The sequence of numbers is transmitted from a storage medium into a digital-to-ana-
log converter (DAC), which converts the numbers back to an analog signal by stick-
Search WWH ::




Custom Search