Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The GetMasterVolume method retrieves the client volume level for the audio session.
Syntax
HRESULT GetMasterVolume(
[out] float *pfLevel
);
Parameters
[out] pfLevel
Pointer to a float variable into which the method writes the client volume level. The volume level is a value in the range 0.0 to 1.0.
Return value
If the method succeeds, it returns S_OK. If it fails, possible return codes include, but are not limited to, the values shown in the following table.
Return code | Description |
---|---|
|
Parameter pfLevel is NULL. |
|
The audio endpoint device has been unplugged, or the audio hardware or associated hardware resources have been reconfigured, disabled, removed, or otherwise made unavailable for use. |
|
The Windows audio service is not running. |
Remarks
This method retrieves the client volume level for the session. This is the volume level that the client set in a previous call to the ISimpleAudioVolume::SetMasterVolume method.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2008 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | audioclient.h |