---
title: "setOutputMuted(_:)"
framework: avfaudio
role: symbol
role_heading: Instance Method
path: "avfaudio/avaudiosession/setoutputmuted(_:)"
---

# setOutputMuted(_:)

Sets a Boolean value to inform the system to mute the session’s output audio. The default value is false (unmuted).

## Declaration

```swift
func setOutputMuted(_ muted: Bool) throws
```

## Discussion

Discussion This property is supported with all categories and modes, except for playAndRecord where it is only supported with default. Changing the mode to non-default mode with playAndRecord category will cause the session to unmute. Changes in output mute state can be observed via outputMuteStateChangeNotification. If this value is set to true, userIntentToUnmuteOutputNotification may be sent when a user hints to unmute by changing the volume. muted: A Boolean value to set the audio output to the desired muted state. error: A pointer to an error object. If an error occurs, the framework sets the pointer to an error object that describes the failure. note: This will not mute system sounds and haptics.

## See Also

### Configuring audio muting

- [isOutputMuted](avfaudio/avaudiosession/isoutputmuted.md)
- [outputMuteStateChangeNotification](avfaudio/avaudiosession/outputmutestatechangenotification.md)
- [muteStateKey](avfaudio/avaudiosession/mutestatekey.md)
- [userIntentToUnmuteOutputNotification](avfaudio/avaudiosession/userintenttounmuteoutputnotification.md)
- [userIntentToUnmuteOutputNotification](avfaudio/avaudiosession/userintenttounmuteoutputnotification.md)
- [muteStateKey](avfaudio/avaudiosession/mutestatekey.md)
