Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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 codeDescription
E_POINTER

Parameter pfLevel is NULL.

AUDCLNT_E_DEVICE_INVALIDATED

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.

AUDCLNT_E_SERVICE_NOT_RUNNING

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

Audioclient.h

See also

IAudioClient::Initialize
ISimpleAudioVolume Interface
ISimpleAudioVolume::SetMasterVolume

 

 

Show:
© 2017 Microsoft