Page 373 -
P. 373
sound before beauty
You were to look at the volume control on the previous page and
identify four key characteristics of the volume control.
There's a scale that goes from a low value to a high value.
1.
The scale has a fixed set of intervals.
2.
The volume control “slider" moves from left to right.
3.
Moving the “slider" dynamically adjusts the volume based on its current
4.
position on the scale.
Start with the volume
Before you start worrying about creating the appropriate GUI interface
element to actually model the slider, you first need to know how to adjust the
volume of a track.
Once you know how to adjust the volume, you can then start to worry
about linking the volume to the slider, with the current position of the slider
dictating the current volume setting.
Then you can allow your user to move the slider which has the effect of
dynamically and interactively adjusting the volume.
Sounds easy, eh?
338 Chapter 9