AudioCaptureOptions

fun AudioCaptureOptions(channelLayout: AudioChannelLayout = STEREO, sampleRate: Int = DEFAULT_SAMPLE_RATE, framesPerBuffer: Int = DEFAULT_FRAMES_PER_BUFFER, muteSource: Boolean = false): AudioCaptureOptions

Creates a new instance of AudioCaptureOptions with the given parameters.

Since

9.6.0

Parameters

channelLayout

The number and order of channels in the captured audio stream.

sampleRate

The sample rate in hertz.

framesPerBuffer

The number of frames per captured buffer. Each frame contains one sample per channel.

muteSource

Tells whether the audio playback is muted while the session is active.

Throws

if sampleRate is out of the supported range, framesPerBuffer is not positive, or a buffer does not last from 10 to 500 milliseconds.