Skip to content

Latest commit

 

History

History
110 lines (88 loc) · 3.12 KB

nf-mfplay-imfpmediaplayer-setvolume.md

File metadata and controls

110 lines (88 loc) · 3.12 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:mfplay.IMFPMediaPlayer.SetVolume
IMFPMediaPlayer::SetVolume (mfplay.h)
Sets the audio volume.
IMFPMediaPlayer interface [Media Foundation]
SetVolume method
IMFPMediaPlayer.SetVolume
IMFPMediaPlayer::SetVolume
SetVolume
SetVolume method [Media Foundation]
SetVolume method [Media Foundation]
IMFPMediaPlayer interface
mf.imfpmediaplayer_setvolume
mfplay/IMFPMediaPlayer::SetVolume
mf\imfpmediaplayer_setvolume.htm
mf
feee2812-7c7e-4c27-86be-8f7316854222
12/05/2018
IMFPMediaPlayer interface [Media Foundation],SetVolume method, IMFPMediaPlayer.SetVolume, IMFPMediaPlayer::SetVolume, SetVolume, SetVolume method [Media Foundation], SetVolume method [Media Foundation],IMFPMediaPlayer interface, mf.imfpmediaplayer_setvolume, mfplay/IMFPMediaPlayer::SetVolume
mfplay.h
Windows
Windows 7 [desktop apps only]
Windows Server 2008 R2 [desktop apps only]
Windows
19H1
IMFPMediaPlayer::SetVolume
mfplay/IMFPMediaPlayer::SetVolume
c++
APIRef
kbSyntax
COM
mfplay.h
IMFPMediaPlayer.SetVolume

IMFPMediaPlayer::SetVolume

-description

Important  Deprecated. This API may be removed from future releases of Windows. Applications should use the Media Session for playback.
 

Sets the audio volume.

-parameters

-param flVolume [in]

The volume level. Volume is expressed as an attenuation level, where 0.0 indicates silence and 1.0 indicates full volume (no attenuation).

-returns

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return code Description
S_OK
The method succeeded.
MF_E_OUT_OF_RANGE
The flVolume parameter is invalid.

-remarks

If you call this method before playback starts, the setting is applied after playback starts.

This method does not change the master volume level for the player's audio session. Instead, it adjusts the per-channel volume levels for audio stream(s) that belong to the current media item. Other streams in the audio session are not affected. For more information, see Managing the Audio Session.

-see-also

IMFPMediaPlayer

Using MFPlay for Audio/Video Playback