Game Development Reference
In-Depth Information
In digital imaging and digital video this resolution is quantified by the number of
pixels, and in digital audio, by how many bits of data are used to define each of the
analog audio samples taken. Again, as with digital imaging, in which more pixels
yields better quality, with digital audio a higher sample resolution yields better sound
reproduction. Thus, higher sampling resolutions, using more data to reproduce a given
sound wave sample, will produce higher-quality audio playback, at the expense of a
larger data footprint. This is the reason that 16-bit audio (commonly referred to as CD
quality audio ) sounds better than 8-bit audio. Depending on the audio involved, 12-bit
audio can be a great compromise.
In digital audio there is a new type of audio sample, known as HD audio in the con-
sumer electronics industry. HD digital audio broadcast radio uses a 24-bit sample resol-
ution, so each audio sample, or slice of the sound wave, contains 16,777,216 bits of
sample resolution. Some of the newer hardware devices now support HD audio, such
as the smartphones you see advertised featuring “HD-quality audio,” meaning that they
have 24-bit audio hardware. These days, laptops (including PCs), as well as game con-
soles and iTVs, also come standard with 24-bit audio playback hardware.
It is important to note that HD audio is probably not necessary for Java 8 games,
unless your game is music oriented and makes use of high-quality music, in which case
you can use HD audio samples via a WAVE file format.
Another consideration is digital audio sampling frequency (also called the
sampling rate ), This is a measure of how many samples at a particular sample resolu-
tion are taken during 1 second of sampling time frame. In terms of digital image edit-
ing, sampling frequency is analogous to the number of colors contained in a digital im-
age. You are probably familiar with the term “CD-quality audio,” which is defined as
using a 16-bit sample resolution and a 44.1kHz sampling rate (taking 44,100 samples,
each of which has 16 bits of sample resolution, or 65,536 bits of audio data). You can
determine the amount of raw data in an audio file by multiplying the sampling bit rate
by the sampling frequency by the number of seconds in the audio snippet. Obviously,
this can potentially be a huge number! Audio codecs are really great at optimizing data
down to an amazingly small data footprint with very little audible loss in quality.
Thus, the exact same trade-off that exists in digital imaging and digital video occurs
with digital audio as well: the more data you include, the higher quality the result, but
always at the cost of a much larger data footprint. In the visual mediums the size of the
data footprint is defined using color depth, pixels, and, in the case of digital video and
animation, frames. In the aural medium it is defined via the sample resolution, in com-
bination with the sampling rate. The most common sampling rates in the digital audio
industry currently include 8kHz , 22kHz , 32kHz , 44.1kHz , 48kHz , 96KHz , 192kHz ,
and even 384kHz .
Search WWH ::




Custom Search