Selects a data source for the audio session’s current input port.
- iOS 6.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
The data source for the audio session’s input.
On input, a pointer to an error object. If an error occurs, the pointer is set to an
NSErrorobject that describes the error. If you do not want error information, pass in
YES if the input data source for the audio session was successfully assigned; otherwise,
You can set the input source to exactly one of the
AVAudio objects in the
input array. Switching among input sources is supported only on certain devices and peripherals; for example, this method can be used to choose between front- and rear-facing microphones on an iPhone equipped with them.