JavaAudioDeviceModule.Builder

tee3.webrtc.audio

## 类 JavaAudioDeviceModule.Builder

- java.lang.Object
- - tee3.webrtc.audio.JavaAudioDeviceModule.Builder

- 封闭类:
    JavaAudioDeviceModule

      public static class JavaAudioDeviceModule.Builder
      extends java.lang.Object

- - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `AudioDeviceModule` | `createAudioDeviceModule()` Construct an AudioDeviceModule based on the supplied arguments.
    `JavaAudioDeviceModule.Builder` | `setAudioRecordErrorCallback(JavaAudioDeviceModule.AudioRecordErrorCallback audioRecordErrorCallback)` Set a callback to retrieve errors from the AudioRecord.
    `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` | `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.

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 方法详细资料

    - #### setSampleRate

          public JavaAudioDeviceModule.Builder setSampleRate(int sampleRate)

      Call this method if the default handling of querying the native sample rate shall be overridden. Can be useful on some devices where the available Android APIs are known to return invalid results.

    - #### setAudioSource

          public JavaAudioDeviceModule.Builder setAudioSource(int audioSource)

      Call this to change the audio source. The argument should be one of the values from android.media.MediaRecorder.AudioSource. The default is AudioSource.VOICE_COMMUNICATION.

    - #### setAudioTrackErrorCallback

          public JavaAudioDeviceModule.Builder setAudioTrackErrorCallback(JavaAudioDeviceModule.AudioTrackErrorCallback audioTrackErrorCallback)

      Set a callback to retrieve errors from the AudioTrack.

    - #### setAudioRecordErrorCallback

          public JavaAudioDeviceModule.Builder setAudioRecordErrorCallback(JavaAudioDeviceModule.AudioRecordErrorCallback audioRecordErrorCallback)

      Set a callback to retrieve errors from the AudioRecord.

    - #### setSamplesReadyCallback

          public JavaAudioDeviceModule.Builder setSamplesReadyCallback(JavaAudioDeviceModule.SamplesReadyCallback samplesReadyCallback)

      Set a callback to listen to the raw audio input from the AudioRecord.

    - #### setUseHardwareNoiseSuppressor

          public JavaAudioDeviceModule.Builder setUseHardwareNoiseSuppressor(boolean useHardwareNoiseSuppressor)

      Control if the built-in HW noise suppressor should be used or not. The default is on if it is supported. It is possible to query support by calling isBuiltInNoiseSuppressorSupported().

    - #### setUseHardwareAcousticEchoCanceler

          public JavaAudioDeviceModule.Builder setUseHardwareAcousticEchoCanceler(boolean useHardwareAcousticEchoCanceler)

      Control if the built-in HW acoustic echo canceler should be used or not. The default is on if it is supported. It is possible to query support by calling isBuiltInAcousticEchoCancelerSupported().

    - #### setUseStereoInput

          public JavaAudioDeviceModule.Builder setUseStereoInput(boolean useStereoInput)

      Control if stereo input should be used or not. The default is mono.

    - #### setUseStereoOutput

          public JavaAudioDeviceModule.Builder setUseStereoOutput(boolean useStereoOutput)

      Control if stereo output should be used or not. The default is mono.

    - #### createAudioDeviceModule

          public AudioDeviceModule createAudioDeviceModule()

      Construct an AudioDeviceModule based on the supplied arguments. The caller takes ownership and is responsible for calling release().