<!--
{
  "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/AVAudioSessionPortDescription/dataSources",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AVFAudio"
    ],
    "preciseIdentifier" : "c:objc(cs)AVAudioSessionPortDescription(py)dataSources"
  },
  "title" : "dataSources"
}
-->

# dataSources

The available data sources for the port.

```
var dataSources: [AVAudioSessionDataSourceDescription]? { get }
```

## Discussion

This feature is only supported on certain devices and peripherals; for example, the data sources represent front- and rear-facing microphones on a device.

Some, but not all, USB ports provide a set of data sources. For example, a USB audio interface may allow you to select between a built-in microphone or external microphone input. The output side may allow you to select between headphones or externally powered speakers. The audio session interface represents the input and output sides of the USB interface as two separate ports of type [`usbAudio`](/documentation/AVFAudio/AVAudioSession/Port/usbAudio).

If this property is `nil`, the port doesn’t support selecting between multiple data sources.

The contents of this array may change if you change the audio session’s mode.

---

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)