IAudioEndpointVolume::SetMute method (endpointvolume.h)
The SetMute method sets the muting state of the audio stream that enters or leaves the audio endpoint device.
Syntax
HRESULT SetMute(
[in] BOOL bMute,
[in] LPCGUID pguidEventContext
);
Parameters
[in] bMute
The new muting state. If bMute is TRUE, the method mutes the stream. If FALSE, the method turns off muting.
[in] pguidEventContext
Context value for the IAudioEndpointVolumeCallback::OnNotify method. This parameter points to an event-context GUID. If the SetMute call changes the muting state of the endpoint, all clients that have registered IAudioEndpointVolumeCallback interfaces with that endpoint will receive notifications. In its implementation of the OnNotify method, a client can inspect the event-context GUID to discover whether it or another client is the source of the control-change event. If the caller supplies a NULL pointer for this parameter, the notification routine receives the context GUID value GUID_NULL.
Return value
If the method succeeds and the muting state changes, the method returns S_OK. If the method succeeds and the new muting state is the same as the previous muting state, the method returns S_FALSE. If the method fails, possible return codes include, but are not limited to, the values shown in the following table.
Return code | Description |
---|---|
|
Out of memory. |
Remarks
For a code example that calls SetMute, see Endpoint Volume Controls.
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 | endpointvolume.h |
See also
IAudioEndpointVolume Interface