Skip to content

Latest commit

 

History

History
120 lines (91 loc) · 4.66 KB

nf-audioclient-isimpleaudiovolume-setmute.md

File metadata and controls

120 lines (91 loc) · 4.66 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:audioclient.ISimpleAudioVolume.SetMute
ISimpleAudioVolume::SetMute (audioclient.h)
The SetMute method sets the muting state for the audio session.
ISimpleAudioVolume interface [Core Audio]
SetMute method
ISimpleAudioVolume.SetMute
ISimpleAudioVolume::SetMute
ISimpleAudioVolumeSetMute
SetMute
SetMute method [Core Audio]
SetMute method [Core Audio]
ISimpleAudioVolume interface
audioclient/ISimpleAudioVolume::SetMute
coreaudio.isimpleaudiovolume_setmute
coreaudio\isimpleaudiovolume_setmute.htm
CoreAudio
64fc7146-8d4b-429c-bf35-c43e31a41af8
12/05/2018
ISimpleAudioVolume interface [Core Audio],SetMute method, ISimpleAudioVolume.SetMute, ISimpleAudioVolume::SetMute, ISimpleAudioVolumeSetMute, SetMute, SetMute method [Core Audio], SetMute method [Core Audio],ISimpleAudioVolume interface, audioclient/ISimpleAudioVolume::SetMute, coreaudio.isimpleaudiovolume_setmute
audioclient.h
Windows
Windows Vista [desktop apps \| UWP apps]
Windows Server 2008 [desktop apps \| UWP apps]
Windows
19H1
ISimpleAudioVolume::SetMute
audioclient/ISimpleAudioVolume::SetMute
c++
APIRef
kbSyntax
COM
Audioclient.h
ISimpleAudioVolume.SetMute

ISimpleAudioVolume::SetMute

-description

The SetMute method sets the muting state for the audio session.

-parameters

-param bMute [in]

The new muting state. TRUE enables muting. FALSE disables muting.

-param EventContext [in]

Pointer to the event-context GUID. If a call to this method generates a volume-change event, the session manager sends notifications to all clients that have registered IAudioSessionEvents interfaces with the session manager. The session manager includes the EventContext pointer value with each notification. Upon receiving a notification, a client can determine whether it or another client is the source of the event by inspecting the EventContext value. This scheme depends on the client selecting a value for this parameter that is unique among all clients in the session. If the caller supplies a NULL pointer for this parameter, the client's notification method receives a NULL context pointer.

-returns

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
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 generates a volume-change event only if the method call changes the muting state of the session from disabled to enabled, or from enabled to disabled. For example, if muting is enabled when the call occurs, and the call enables muting, no event is generated.

This method applies the same muting state to all channels in the audio session. The endpoint device always applies muting uniformly across all the channels in the session. There are no IChannelAudioVolume methods for setting the muting states of individual channels.

The client can get the muting state of the audio session by calling the SimpleAudioVolume::GetMute method.

-see-also

IAudioSessionEvents Interface

IChannelAudioVolume Interface

ISimpleAudioVolume Interface

ISimpleAudioVolume::GetMute