WORD midiOutGetVolume(wDeviceID, lpdwVolume)
This function returns the current volume setting of a MIDI output device.
WORD wDeviceID
Identifies the MIDI output device.
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 mono volume level.
The full 16-bit setting(s) set with midiOutSetVolume is returned, regardless of whether the device supports the full 16 bits of volume level control.
Returns zero if the function was successful. Otherwise, it returns an error number. Possible error returns are:
MMSYSERR_INVALHANDLE
Specified device handle is invalid.
MMSYSERR_NOTSUPPORTED
Function isn't supported.
MMSYSERR_NODRIVER
The driver was not installed.
Not all devices support volume control. To determine whether the device supports
volume control, use the MIDICAPS_VOLUME flag to test the dwSupport field of
the MIDIOUTCAPS structure (filled by midiOutGetDevCaps).
To determine whether the device supports volume control on both the left and right channels, use the MIDICAPS_LRVOLUME flag to test the dwSupport field of the MIDIOUTCAPS structure (filled by midiOutGetDevCaps).
midiOutSetVolume