Sets the preferred audio data source for the port.
- iOS 7.0+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
The data source to be used.
true if a request was successfully made, or
Requests a change of data source; to determine whether the change takes effect, use the
selected property. (See “Configuring the Audio Session” in the
AVAudio class reference for details.)
If the port is in use, changing this setting will likely result in a route reconfiguration.
Set a preferred data source only after setting the audio session’s category and mode and activating the session.