Game Development Reference
In-Depth Information
(with the possible exception of new hardware featuring 24-bit HD audio playback
hardware compatibility). All hardware plays digital audio assets well, so audio optimiz-
ation is a “one audio asset hits all devices” scenario, whereas with the visual (video,
image, animation) part of the equation, you have display screens as large as 4,096 ×
2,160 pixels (4K iTV Sets) and as small as 320 × 320 pixels (flip phones and smart
watches).
It is important to remember that the user's ears cannot perceive the same quality
difference with digital audio that the user's eyes can with digital imagery, 2D anima-
tion, and digital video. Generally, there are three primary “sweet spots” of digital audio
support across all hardware devices that you should target for support for Java game
audio.
Lower-quality audio, such as short narration tracks, character exclamations, and
short-duration sound effects, can achieve remarkably high quality by using a sampling
rate of 8kHZ or 22kHz , along with 8-bit or 12-bit sampling resolution. Medium-qual-
ity audio, such as long narration tracks, longer-duration sound effects, and looped
background (ambient) audio, can achieve a very high quality level by using a 22kHz or
32kHz sampling rate, along with a 12-bit or 16-bit sampling resolution.
The high-quality audio assets, such as music, should be optimized approaching
CD-quality audio and will use a 32kHz or 44.1kHz sampling rate, along with the
16-bit data sampling resolution. For HD -quality audio, being at the ultra-high end of
this audio spectrum, you would use the 48kHz sampling rate, along with the 24-bit di-
gital audio data sampling resolution. There is also an unnamed, “somewhere in the
middle” high-end audio specification, using a 48kHz sampling rate, along with a
16-bit data sampling resolution, which just happens to be what Dolby THX used to use
for its high-end audio experience technology in movie theaters (back in the day).
Ultimately, it comes down to the quality-file size balance results that emerge from
the digital audio data footprint optimization work process, which can be amazing.
Therefore, your initial work process for optimizing your digital audio assets across all
these hardware devices is going to be to create baseline 16-bit assets, at either 44.1kHz
or 48kHz, and then optimize (compress) them, using the different formats supported in
JavaFX. Once that work process is completed, you can see which resulting digital au-
dio assets provide the smallest data footprint, along with the highest quality digital au-
dio playback. After that, you can reduce your 44.1KHz or 48kHz data to 32kHz and
save that out ,using first 16-bit and then 12-bit resolution. Next, reopen the original
48kHz data, downsample to 22kHz sample frequency, and export that, using 16-bit and
12-bit resolution, and so on. You will be performing this work process later on, when
you add digital audio assets to the Java 8 game, so you will see the entire process (see
Chapter 15 ) .
Search WWH ::




Custom Search