464 CHAPTER 12: Digital Audio: Providing Aural Feedback for UI Designs Using SoundPool
Now that you’ve set up the two major Java objects needed to implement a SoundPool engine, all
you need to do is to, you guessed it, wire them together using a SparseIntArray .append( ) method
call and a SoundPool .load( ) method call. Before loading your SoundPool with these digital audio
asset references, you need to install them!
In Explorer, seen in Figure 12-17, select the three audio assets you wish to use, right-click, and
click Copy.
Figure 12-17. The AMR, FLAC, M4A, MP3, and OGG files and copying three for /res/raw
Figure 12-16. Declare a SparseIntArray object named buttonSampleArray and instantiate it in onCreate( ) using new