Previous Next


The SetMute method sets the muting state of the audio stream that enters or leaves the audio endpoint device.

  BOOL  bMute,
  LPCGUID  pguidEventContext



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


[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 code Description
E_OUTOFMEMORY Out of memory.


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


Client: Windows Vista

Header: Include Endpointvolume.h.

See Also

Previous Next