Audio Capture Options
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
channel Layout
The number and order of channels in the captured audio stream.
sample Rate
The sample rate in hertz.
frames Per Buffer
The number of frames per captured buffer. Each frame contains one sample per channel.
mute Source
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.