Instance Property


The preferred audio data source for the port.


var preferredDataSource: AVAudioSessionDataSourceDescription? { get }


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.