auxGetVolume

Syntax

WORD auxGetVolume(wDeviceID, lpdwVolume)

This function returns the current volume setting of an auxiliary output device.

Parameters

WORD wDeviceID

Identifies the auxiliary output device to be queried.

LPDWORD lpdwVolume

Specifies a far pointer to a location to be filled with the current volume setting. The low-order word of this location contains the left channel volume setting, and the high-order word contains the right channel setting. A value of 0xFFFF represents full volume, and a value of 0x0000 is silence.

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 auxSetVolume are returned, regardless of whether the device supports the full 16 bits of volume level control.

Return Value

Returns zero if the function was successful. Otherwise, it returns an error number. Possible error returns are:

MMSYSERR_BADDEVICEID

Specified device ID is out of range.

MMSYSERR_NODRIVER

The driver failed to install.

Comments

Not all devices support volume control. To determine whether the device supports volume control, use the AUXCAPS_VOLUME flag to test the dwSupport field of the AUXCAPS structure (filled by auxGetDevCaps).

To determine whether the device supports volume control on both the left and right channels, use the AUXCAPS_LRVOLUME flag to test the dwSupport field of the AUXCAPS structure (filled by auxGetDevCaps).

See Also

auxSetVolume