---
title: selectedDataSource
framework: avfaudio
role: symbol
role_heading: Instance Property
path: avfaudio/avaudiosessionportdescription/selecteddatasource
---

# selectedDataSource

The currently selected audio data source for the port.

## Declaration

```swift
var selectedDataSource: AVAudioSessionDataSourceDescription? { get }
```

## Discussion

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

## See Also

### Managing a Port’s Data Sources

- [dataSources](avfaudio/avaudiosessionportdescription/datasources.md)
- [preferredDataSource](avfaudio/avaudiosessionportdescription/preferreddatasource.md)
- [setPreferredDataSource(_:)](avfaudio/avaudiosessionportdescription/setpreferreddatasource(_:).md)
