<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFAudio",
  "identifier" : "/documentation/AVFAudio/AVAudioSessionDataSourceDescription/setPreferredPolarPattern(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFAudio"
    ],
    "preciseIdentifier" : "c:objc(cs)AVAudioSessionDataSourceDescription(im)setPreferredPolarPattern:error:"
  },
  "title" : "setPreferredPolarPattern(_:)"
}
-->

# setPreferredPolarPattern(_:)

Selects the preferred directivity configuration for the data source.

```
func setPreferredPolarPattern(_ pattern: AVAudioSession.PolarPattern?) throws
```

## Parameters

`pattern`

The directivity configuration to use.

## Discussion

Calling this method requests a change to the selected polar pattern. To determine whether the change has taken effect, inspect the [`selectedPolarPattern`](/documentation/AVFAudio/AVAudioSessionDataSourceDescription/selectedPolarPattern) property.

If the data source and its owning port are in use, using this method to change the directivity configuration is likely to result in a route reconfiguration.

Set a preferred polar pattern only after setting the audio session’s category and mode, and activating the session.

---

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)