setPreferredOutputNumberOfChannels(_:)
Sets the preferred number of output channels for the current route.
Declaration
func setPreferredOutputNumberOfChannels(_ count: Int) throwsParameters
- count:
The number of output channels you want to use.
Discussion
This method requests a change to the number of output channels. To determine whether the change has taken effect, use the outputNumberOfChannels property. For details, see Configuring standard audio behaviors. Requesting output channels less than one or greater than that returned by the maximumOutputNumberOfChannels results in an error. Only certain devices and peripherals support this feature.
Set the preferred number of output channels only after setting the audio session’s category and mode, and activating the session.