Instance Method

setPreferredInputNumberOfChannels:error:

Sets the preferred number of input channels for the current route.

Declaration

- (BOOL)setPreferredInputNumberOfChannels:(NSInteger)count error:(NSError * _Nullable *)outError;

Parameters

count

The number of input channels you want to use.

outError

On input, a pointer to an error object. If an error occurs, the system sets the pointer to an NSError object that describes the error. If you don’t want error information, pass in nil.

Return Value

YES if a request was successfully made, otherwise NO.

Discussion

This method requests a change to the number of input channels. To determine whether the change has taken effect, query or key-value observe the inputNumberOfChannels property.

Requesting input channels less than one or greater than that returned by the maximumInputNumberOfChannels results in an error.

Set the preferred number of input channels only after setting the audio session’s category and mode, and activating the session.

See Also

Working with Audio Channels

inputNumberOfChannels

The number of audio input channels for the current route.

maximumInputNumberOfChannels

The maximum number of input channels available for the current audio route.

preferredInputNumberOfChannels

The preferred number of input channels for the current route.

outputNumberOfChannels

The number of audio output channels.

maximumOutputNumberOfChannels

The maximum number of output channels available for the current audio route.

preferredOutputNumberOfChannels

The preferred number of output channels for the current route.

- setPreferredOutputNumberOfChannels:error:

Sets the preferred number of output channels for the current route.

currentHardwareInputNumberOfChannels

The number of audio hardware input channels.

Deprecated
currentHardwareOutputNumberOfChannels

The number of audio hardware output channels.

Deprecated