The auxGetVolume function retrieves the current volume setting of the specified auxiliary output device.
MMRESULT auxGetVolume(
UINT uDeviceID,
LPDWORD lpdwVolume
);
If a device does not support both left and right volume control, the low-order word of the specified location contains the volume level.
The full 16-bit setting(s) set with the auxSetVolume function are returned, regardless of whether the device supports the full 16 bits of volume-level control.
Returns MMSYSERR_NOERROR if successful or an error otherwise. Possible error values include the following:
Value | Description |
---|---|
MMSYSERR_BADDEVICEID | Specified device identifier is out of range. |
Not all devices support volume control. To determine whether a device supports volume control, use the AUXCAPS_VOLUME flag to test the dwSupport member of the AUXCAPS structure (filled by the auxGetDevCaps function).
To determine whether a device supports volume control on both the left and right channels, use the AUXCAPS_LRVOLUME flag to test the dwSupport member of the AUXCAPS structure (filled by auxGetDevCaps).
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in mmsystem.h.
Import Library: Use winmm.lib.
Waveform Audio Overview, Waveform Functions, auxSetVolume, AUXCAPS, auxGetDevCaps