SoundGetWaveVolume

Retrieves the wave output volume for a sound device.

SoundGetWaveVolume, OutputVar [, DeviceNumber]

Parameters

OutputVar

The name of the variable in which to store the retrieved volume level, which is a floating point number between 0 and 100 inclusive. The variable will be made blank if there was a problem retrieving the volume. The format of the floating point number, such as its decimal places, is determined by SetFormat.

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

[v1.1.04+] This command is able to throw an exception on failure. For more information, see Runtime Errors.

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

Remarks

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

Windows Vista and later (v1.1.10+): This command is equivalent to SoundGet with ComponentType set to Wave and ControlType set to Volume.

Related

SoundSetWaveVolume, SoundSet, SoundGet, SoundPlay

Example

SoundGetWaveVolume, OutputVar
MsgBox, The current wave output volume level is %OutputVar%`%.