Pro Java 9 Games Development Leveraging the JavaFX APIs

(Michael S) #1
Chapter 21 ■ Questions and answers: Finishing the setup Methods and digital audio

I am going to use the 24th sample in the Massamolla collection, found in the Rhythmic Sequence
folder, as shown selected in Figure 21-25. This sample is called ScrewdriverGroove and is in 32-bit 44.1 Hz
WAVE format; it uses a 1411 Kbps compression rate and is 18 seconds long, of which we will loop around
7 seconds to reduce the memory data footprint. We’ll also convert this to a MONO sample to save memory
and will create several versions of this file.


Data Footprint Optimization: Use Audacity to Create Game Audio


Notice the file size in Figure 21-25 is 3,159 kilobytes, which is too much memory to use for spin audio! We
will be trimming nearly 3MB off of this file size for the low-quality audio component and creating a high-
quality audio asset that is little more than half a megabyte in size, so this should be an interesting section
for all of you game developers! Launch Audacity 2.1.3 (or later version), which I will assume you have
downloaded and installed already. Use the File ➤ Open menu sequence to open the ScrewdriverGroove
sample shown in Figure 21-25; find the first large gap in its repetitive sound, shown in Figure 21-26 using a
green line, at approximately 7.6 seconds into this file.


Figure 21-25. Go to http://www.99sounds.org and download free digital audio samples for all your pro Java 9 game
projects

Free download pdf