<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AudioToolbox",
  "identifier" : "/documentation/AudioToolbox/kAudioSessionProperty_OverrideCategoryDefaultToSpeaker",
  "metadataVersion" : "0.1.0",
  "role" : "Global Variable",
  "symbol" : {
    "kind" : "Global Variable",
    "modules" : [
      "Audio Toolbox"
    ],
    "preciseIdentifier" : "c:@Ea@kAudioSessionProperty_PreferredHardwareSampleRate@kAudioSessionProperty_OverrideCategoryDefaultToSpeaker"
  },
  "title" : "kAudioSessionProperty_OverrideCategoryDefaultToSpeaker"
}
-->

# kAudioSessionProperty_OverrideCategoryDefaultToSpeaker

Specifies whether or not to route audio to the speaker (instead of to the receiver) when no other audio route, such as a headset, is connected.

```
var kAudioSessionProperty_OverrideCategoryDefaultToSpeaker: Int { get }
```

## Discussion

A read/write `UInt32` value. By default, the value of this property is `FALSE` (`0`).

This property retains its value through an audio route change (such as when plugging in or unplugging a headset), and upon interruption; it reverts to its default value only upon an audio session category change.  This property can be used only with the [`kAudioSessionCategory_PlayAndRecord`](/documentation/AudioToolbox/kAudioSessionCategory_PlayAndRecord) (or the equivalent <doc://com.apple.documentation/documentation/AVFAudio/AVAudioSession/Category-swift.struct/playAndRecord>) category.

See also [`kAudioSessionProperty_OverrideAudioRoute`](/documentation/AudioToolbox/kAudioSessionProperty_OverrideAudioRoute).

---

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)