Sets the preferred sample rate for input and output.
- iOS 6.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
The hardware sample rate to use. The available range for hardware sample rate is device dependent. It typically ranges from 8000 through 48000 hertz.
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 a request was successfully made, or
This method requests a change to the input and output audio sample rate. To see the effect of this change, use the
You can set a preferred sample rate before or after activating the audio session.