public static class JavaAudioDeviceModule.Builder
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
AudioDeviceModule |
createAudioDeviceModule()
Construct an AudioDeviceModule based on the supplied arguments.
|
JavaAudioDeviceModule.Builder |
setAudioFormat(int audioFormat)
Call this to change the audio format.
|
JavaAudioDeviceModule.Builder |
setAudioRecordErrorCallback(JavaAudioDeviceModule.AudioRecordErrorCallback audioRecordErrorCallback)
Set a callback to retrieve errors from the AudioRecord.
|
JavaAudioDeviceModule.Builder |
setAudioRecordStateCallback(JavaAudioDeviceModule.AudioRecordStateCallback audioRecordStateCallback)
Set a callback to retrieve information from the AudioRecord on when audio starts and stops.
|
JavaAudioDeviceModule.Builder |
setAudioSource(int audioSource)
Call this to change the audio source.
|
JavaAudioDeviceModule.Builder |
setAudioTrackErrorCallback(JavaAudioDeviceModule.AudioTrackErrorCallback audioTrackErrorCallback)
Set a callback to retrieve errors from the AudioTrack.
|
JavaAudioDeviceModule.Builder |
setAudioTrackStateCallback(JavaAudioDeviceModule.AudioTrackStateCallback audioTrackStateCallback)
Set a callback to retrieve information from the AudioTrack on when audio starts and stop.
|
JavaAudioDeviceModule.Builder |
setInputSampleRate(int inputSampleRate)
Call this method to specifically override input sample rate.
|
JavaAudioDeviceModule.Builder |
setOutputSampleRate(int outputSampleRate)
Call this method to specifically override output sample rate.
|
JavaAudioDeviceModule.Builder |
setSampleRate(int sampleRate)
Call this method if the default handling of querying the native sample rate shall be
overridden.
|
JavaAudioDeviceModule.Builder |
setSamplesReadyCallback(JavaAudioDeviceModule.SamplesReadyCallback samplesReadyCallback)
Set a callback to listen to the raw audio input from the AudioRecord.
|
JavaAudioDeviceModule.Builder |
setUseHardwareAcousticEchoCanceler(boolean useHardwareAcousticEchoCanceler)
Control if the built-in HW acoustic echo canceler should be used or not.
|
JavaAudioDeviceModule.Builder |
setUseHardwareNoiseSuppressor(boolean useHardwareNoiseSuppressor)
Control if the built-in HW noise suppressor should be used or not.
|
JavaAudioDeviceModule.Builder |
setUseStereoInput(boolean useStereoInput)
Control if stereo input should be used or not.
|
JavaAudioDeviceModule.Builder |
setUseStereoOutput(boolean useStereoOutput)
Control if stereo output should be used or not.
|
public JavaAudioDeviceModule.Builder setSampleRate(int sampleRate)
public JavaAudioDeviceModule.Builder setInputSampleRate(int inputSampleRate)
public JavaAudioDeviceModule.Builder setOutputSampleRate(int outputSampleRate)
public JavaAudioDeviceModule.Builder setAudioSource(int audioSource)
public JavaAudioDeviceModule.Builder setAudioFormat(int audioFormat)
public JavaAudioDeviceModule.Builder setAudioTrackErrorCallback(JavaAudioDeviceModule.AudioTrackErrorCallback audioTrackErrorCallback)
public JavaAudioDeviceModule.Builder setAudioRecordErrorCallback(JavaAudioDeviceModule.AudioRecordErrorCallback audioRecordErrorCallback)
public JavaAudioDeviceModule.Builder setSamplesReadyCallback(JavaAudioDeviceModule.SamplesReadyCallback samplesReadyCallback)
public JavaAudioDeviceModule.Builder setAudioTrackStateCallback(JavaAudioDeviceModule.AudioTrackStateCallback audioTrackStateCallback)
public JavaAudioDeviceModule.Builder setAudioRecordStateCallback(JavaAudioDeviceModule.AudioRecordStateCallback audioRecordStateCallback)
public JavaAudioDeviceModule.Builder setUseHardwareNoiseSuppressor(boolean useHardwareNoiseSuppressor)
public JavaAudioDeviceModule.Builder setUseHardwareAcousticEchoCanceler(boolean useHardwareAcousticEchoCanceler)
public JavaAudioDeviceModule.Builder setUseStereoInput(boolean useStereoInput)
public JavaAudioDeviceModule.Builder setUseStereoOutput(boolean useStereoOutput)
public AudioDeviceModule createAudioDeviceModule()
6.4.1