<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFAudio",
  "identifier" : "/documentation/AVFAudio/AVAudioSession/setOutputMuted(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFAudio"
    ],
    "preciseIdentifier" : "c:objc(cs)AVAudioSession(im)setOutputMuted:error:"
  },
  "title" : "setOutputMuted(_:)"
}
-->

# setOutputMuted(_:)

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

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

## Discussion

This property is supported with all categories and modes, except for
[`playAndRecord`](/documentation/AVFAudio/AVAudioSession/Category-swift.struct/playAndRecord) where it is only supported with [`default`](/documentation/AVFAudio/AVAudioSession/Mode-swift.struct/default).
Changing the mode to non-default mode with [`playAndRecord`](/documentation/AVFAudio/AVAudioSession/Category-swift.struct/playAndRecord)
category will cause the session to unmute.

Changes in output mute state can be observed via [`outputMuteStateChangeNotification`](/documentation/AVFAudio/AVAudioSession/outputMuteStateChangeNotification).
If this value is set to true, [`userIntentToUnmuteOutputNotification`](/documentation/AVFAudio/AVAudioSession/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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)