Instance Property

preferredDataSource

The preferred audio data source for the port.

Declaration

var preferredDataSource: AVAudioSessionDataSourceDescription? { get }

Discussion

The value of this property indicates the data source selected using the setPreferredDataSource(_:) method. To see the actual data source, use the selectedDataSource property.

If nil, the port does not support selecting between multiple data sources or no preferred data source has been selected.

See Also

Managing a Port’s Data Sources

var dataSources: [AVAudioSessionDataSourceDescription]?

The available data sources for the port.

var selectedDataSource: AVAudioSessionDataSourceDescription?

The currently selected audio data source for the port.

func setPreferredDataSource(AVAudioSessionDataSourceDescription?)

Sets the preferred audio data source for the port.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software