GetVolume
soundChannel:GetVolume()
Returns the playback volume level for the channel.
DISCUSSION
- return value
- The channel's playback volume, expressed in decibels. The integer value 0 corresponds to silent, and values 1, 2, 3, and 4 correspond to decibel levels -18 dB, -6 dB, -3 dB, and 0 dB (unity gain) respectively. This method returns
nil
when the channel does not specify its own volume but instead inherits it from user preference settings (thesoundVolumeDb
variable), which is the default behavior.
The channel must be open. If it is not, an exception with the error code -30010 is thrown.
If the unit has a hardware volume control, and the sound channel is playing, this method returns the actual playing volume; otherwise, it returns the channel volume as set by the *
SetVolume
method. If no volume has been set using *SetVolume
, and the channel is not playing, this method returnsnil
.
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help