Contents

setInputDataSource(_:)

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

Declaration

func setInputDataSource(_ dataSource: AVAudioSessionDataSourceDescription?) throws

Parameters

  • dataSource:

    The data source for the audio session’s input.

Discussion

You can set the input source to exactly one of the AVAudioSessionDataSourceDescription objects in the inputDataSources array. Only certain devices and peripherals, such as an iPhone equipped with both front- and rear-facing microphones, support switching among input sources.

See Also

Configuring inputs