SetVolume
Description: |
baSetVolume sets the volume level of the sound card for wave files and audio CD. | ||||||||||||||||||||||||||||||||||||
Platforms: |
Windows and Macintosh | ||||||||||||||||||||||||||||||||||||
Usage: |
Result = baSetVolume( Device, Volume ) | ||||||||||||||||||||||||||||||||||||
Arguments: |
String, integer. Device is the device to get the volume of. Can be:
Volume is the volume level to set. The volume level can be between 0 (silence) and 100 (maximum). For the mute devices, Volume can be either 1 for mute on, or 0 for mute off. |
||||||||||||||||||||||||||||||||||||
Returns: |
Integer. |
||||||||||||||||||||||||||||||||||||
Examples: |
Director: Authorware: |
||||||||||||||||||||||||||||||||||||
Notes: |
Not all sound cards support this function. Some cards will only support some of the device types. They will return -1 if the function is not supported. The function will set the volume from the first sound card found. Some sound cards do not set the volume precisely. For example, if you set the volume to 50, then call the baGetVolume function, it may return 48 or 49. On Windows Vista, Microsoft made some big changes to the way the sound API works, you can no longer set the level for individual device types. On Macintosh, you can also use "master" for
"speakers". |
||||||||||||||||||||||||||||||||||||
See also: |
baGetVolume |