getCustomAudioCaptureDataBufferSize
public static int getCustomAudioCaptureDataBufferSize(int sampleRate,
boolean useStereoInput)
Calculates the buffer size for custom audio capture data based on the given sample rate and whether stereo input
is used. If you want to use custom audio capture, you MUST call this method to get the size of the ByteBuffer you
input.
- Parameters:
sampleRate
- The sample rate of the custom audio capture data (in Hz), e.g., 44100 or 48000.
useStereoInput
- If true, stereo input is used; if false, mono input is used.
- Returns:
- The calculated buffer size in bytes.
- See Also:
TcrSessionConfig.Builder#enableCustomAudioCapture(boolean, int, boolean)