The available data sources for the port.
SDKs
- iOS 7.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
Framework
- AVFoundation
Declaration
var dataSources: [AVAudio Session Data Source Description]? { get }
Discussion
This feature is only supported on certain devices and peripherals; for example, the data sources represent front- and rear-facing microphones on an iPhone equipped with such.
Some, but not all, USB ports will 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 will represent the input and output sides of the USB interface as two separate ports of type usb
.
If this property is nil
, the port does not support selecting between multiple data sources.
The contents of this array may change if the mode is changed for the AVAudio
object owning the port.