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.

IAudioEndpointVolume::SetMute method

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

bMute [in]

The new muting state. If bMute is TRUE, the method mutes the stream. If FALSE, the method turns off muting.

pguidEventContext [in]

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

Out of memory.

 

Remarks

For a code example that calls SetMute, see Endpoint Volume Controls.

Requirements

Minimum supported client

Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 [desktop apps | Windows Store apps]

Header

Endpointvolume.h

See also

IAudioEndpointVolume Interface
IAudioEndpointVolumeCallback Interface
IAudioEndpointVolumeCallback::OnNotify

 

 

Community Additions

Show:
© 2014 Microsoft