Pro Java 9 Games Development Leveraging the JavaFX APIs

(Michael S) #1
Chapter 2 ■ an IntroduCtIon to Content CreatIon: 2d new MedIa asset FundaMentals

Just like with digital imaging, this sampling accuracy precision is termed the resolution or, more
accurately (no pun intended), the sampling resolution. Sample resolution is usually defined using 8-bit,
12-bit, 16-bit, 24-bit, or 32-bit resolution. Java games mostly leverage the 8-bit resolution for effects such as
explosions where clarity is not as important, use 12-bit resolution for crystal-clear spoken dialog and more
important audio effects assets, and possibly use CD quality 16-bit resolution for background music or audio
elements that need to exhibit pristine audio quality.
In digital imaging and digital video, this resolution is quantified in the number of pixels, and in digital
audio, this resolution is quantified in how many bits of data are used to define each of the analog audio
samples taken. Just like in digital imaging (more pixels yields better quality), a higher sample resolution
yields better sound reproduction. Thus, higher sampling resolutions, using more data to reproduce a given
sound wave sample, will yield a higher audio playback quality, at the expense of a larger data footprint. This
is the reason why 16-bit audio, commonly termed CD-quality audio, will sound better than 8-bit audio.
Depending on the audio involved, 12-bit can be a good compromise.
In digital audio, there is a new type of 24-bit audio sample, known as HD audio, in the consumer
electronics industry. HD digital audio broadcast radio uses 24-bit sample resolution. Each audio sample,
or slice of a sound wave, can potentially contain up to 16,777,216 bits of sound wave sampling resolution,
although all the bits are rarely used.


Figure 2-7. Stereo sample of button sound effect in Audacity using 32-bit float sample accuracy and 48kHz
sample rate

Free download pdf