Instance Method

setPreferredHardwareSampleRate:error:

Sets the preferred hardware sample rate for input and output.

Declaration

- (BOOL)setPreferredHardwareSampleRate:(double)sampleRate error:(NSError * _Nullable *)outError;

Parameters

sampleRate

The hardware sample rate you want to use. The available range for hardware sample rate is device dependent.

outError

On input, a pointer to an error object. If an error occurs, the pointer is set to an NSError object that describes the error. If you do not want error information, pass in nil.

Return Value

Returns YES on success or NO on failure.

See Also

Deprecations

- init

Gets a reference to the singleton audio session.

Deprecated
delegate

The delegate object for the audio session.

Deprecated
inputIsAvailable

A Boolean value that indicates whether a hardware audio input path is available (YES), or not (NO).

Deprecated
- setActive:withFlags:error:

Activates or deactivates your app’s audio session; provides flags for use by other audio sessions.

Deprecated
currentHardwareInputNumberOfChannels

The number of audio hardware input channels.

Deprecated
currentHardwareOutputNumberOfChannels

The number of audio hardware output channels.

Deprecated
currentHardwareSampleRate

The audio hardware sample rate, in hertz.

Deprecated
preferredHardwareSampleRate

The preferred hardware sample rate, in hertz.

Deprecated