SoundSetWaveVolume

Changes the wave output volume for a sound device.

SoundSetWaveVolume, Percent [, DeviceNumber]

 

Parameters

Percent Percentage number between -100 and 100 inclusive (it can be a floating point number or an expression). If the number begins with a plus or minus sign, the current volume level will be adjusted up or down by the indicated amount. Otherwise, the volume will be set explicitly to the level indicated by Percent.
DeviceNumber If this parameter is omitted, it defaults to 1 (the first sound device), which is usually the system's default device for recording and playback. Specify a number higher than 1 to operate upon a different sound device.

 

ErrorLevel

ErrorLevel is set to 1 if there was a problem or 0 otherwise.

 

Remarks

The current wave output volume level can be retrieved via SoundGetWaveVolume. Settings such as Master Volume, Synth, Microphone, Mute, Treble, and Bass can be set and retrieved using SoundSet and SoundGet.

Unlike SoundSet, this command attempts to preserve the existing balance between channels (e.g. left and right) when changing the volume level.

 

Related

SoundGetWaveVolume, SoundSet, SoundGet, SoundPlay

 

Examples

SoundSetWaveVolume, 50 ; Set the volume to its half-way point.

SoundSetVolume, -10 ; Decrease the current level by 10 (e.g. 80 would become 70).

SoundSetVolume, +20 ; Increase the current level by 20.