Instance Property

inputDataSources

An array of available data sources for the audio session’s current input port.

Declaration

@property(readonly) NSArray<AVAudioSessionDataSourceDescription *> *inputDataSources;

Discussion

An array of AVAudioSessionDataSourceDescription objects representing available input sources, or nil if switching between multiple input sources is not currently possible. This feature is supported only on certain devices and peripherals–for example, on an iPhone equipped with both front- and rear-facing microphones.

You can observe changes to the value of this property by using Key-value observing.

See Also

Working with Audio Routes

currentRoute

An object describing the current audio input and output route.

inputAvailable

A Boolean value indicating whether an audio input path is available.

availableInputs

An array of input ports available for routing.

preferredInput

The preferred input port for audio routing.

- setPreferredInput:error:

Sets the preferred input port for audio routing.

inputDataSource

The currently selected input data source.

- setInputDataSource:error:

Selects a data source for the audio session’s current input port.

outputDataSources

An array of available output data sources for the current audio route.

outputDataSource

The currently selected output data source.

- setOutputDataSource:error:

Sets the output data source for an audio session.

- overrideOutputAudioPort:error:

Temporarily changes the current audio route.

routeSharingPolicy

The current routing policy.

- setCategory:mode:routeSharingPolicy:options:error:

Sets the session category, mode, route sharing policy, and options.