ISimpleAudioVolume::GetMasterVolume method
The GetMasterVolume method retrieves the client volume level for the audio session.
Syntax
HRESULT GetMasterVolume(
[out] float *pfLevel
);
Parameters
- pfLevel [out]
-
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
|
Minimum supported client |
Windows Vista [desktop apps | Windows Store apps] |
|---|---|
|
Minimum supported server |
Windows Server 2008 [desktop apps | Windows Store apps] |
|
Minimum supported phone |
Windows Phone 8 |
|
Header |
|
See also