468 CHAPTER 12: Digital Audio: Providing Aural Feedback for UI Designs Using SoundPool
As you can see in Figure 12-21, if you type in the Context object and a period, Eclipse will give you
a pop-up helper dialog filled with all of the Android System Service types (constants) which are
available for your app.
- Next, create a floating-point variable named currentSoundVolume to hold
the current audio stream volume and set it equal to a .getStreamVolume( )
method call off of the audioControl AudioManager object which you just
created. If you type in the audioControl object and hit the period key, Eclipse
will pop-up a helper dialog, which is shown in Figure 12-22, that contains all
the method calls that you can utilize with an AudioManager object.
Figure 12-21. Declare and instantiate an AudioManager object named audioControl; configure as audio_service
Figure 12-22. Add a currentSoundVolume float variable and call a .getStreamVolume( ) method off of the audioControl object