A (175)

(Tuis.) #1
CHAPTER 12: Digital Audio: Providing Aural Feedback for UI Designs Using SoundPool 453

Setting Sample Rate and Resolution in Audacity


In the bluish-gray control panel located to the left of the visual display of your stereo audio sample,
you will see your button_sound_effect sample file name, or the first part of it at least, and an
arrowhead pointing down next to it. Click on this arrow to drop-down the options menu, select the
Set Sample Format option, and then select the 16-bit PCM option from its sub-menu, shown in
Figure 12-7.


Figure 12-7. Setting audio sample resolution to 16-bit PCM (uncompressed) before you export to various formats


Setting the sample format using this menu will assure that you are exporting using the 16-bit sample
resolution, for which audio playback is supported across all Android hardware devices. Next, export
your baseline 16-bit uncompressed Wave audio .wav file format, which we will use to see what the
largest possible audio file size (to use as your baseline) would be for this 16-bit 48 kHz audio sample
of a 1.15 second button sound effect.


The new file size should theoretically be around half of the original file size that you opened
(imported) into the Audacity 2.0.5 software, since 16-bits of data is half as much data as 32-bits of
data. We will name the exported file buttonaudio.wav, as that is a simple file name which we’re
going to use for this audio asset using Android’s lowercase-characters-only rule. We will reference

Free download pdf