Sets the preferred audio data source for the port.
- iOS 7.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
The data source to use.
true if a request was successfully made, otherwise
Call this method to request a change to the audio session’s preferred data source. To determine whether the change has taken effect, inspect the
selected property. (For details, see Configuring the Audio Session in the
AVAudio class reference).
If the port is in use, changing this setting is likely to result in a route reconfiguration.
Set a preferred data source only after setting the audio session’s category and mode, and activating the session.