Package

## Interface AudioController

- All Implemented Interfaces:

      public interface AudioController

  Interface for controlling different audio settings. This object is only valid while the SinchClient is started. As soon as the SinchClient is stopped, it is invalidated and must not be used.

  Please see AudioController.enableAutomaticAudioRouting for advanced automatic audio routing options.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `public enum` | `AudioController.UseSpeakerphone` |
    `public final class` | `AudioController.AudioRoutingConfig` | Automatic routing configuration data.

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---

  - ### Enum Constant Summary

    Enum Constants
    Enum Constant | Description
    --- | ---

  - ### Method Summary

    Modifier and Type | Method | Description
    --- | --- | ---
    `abstract Unit` | `mute()` | Mutes audio input.
    `abstract Unit` | `unmute()` | Unmutes audio input.
    `abstract Unit` | `enableSpeaker()` | Enables speaker mode.
    `abstract Unit` | `disableSpeaker()` | Disables speaker mode.
    `abstract Unit` | `setLocalAudioListener(LocalAudioListener listener)` | Sets a listener for the local audio listener.
    `abstract Unit` | `enableAutomaticAudioRouting(AudioController.AudioRoutingConfig audioRoutingConfig)` | Enables automatic audio routing between earpiece, speakerphone, wired headset and bluetooth audio devices.
    `abstract Unit` | `disableAutomaticAudioRouting()` | Disables automatic audio routing (AAR).
    `abstract Boolean` | `isMute()` | Indicates whether the microphone is muted.
    `abstract Boolean` | `isSpeakerOn()` | Indicates whether the speaker is enabled.
    `abstract Boolean` | `isAutomaticAudioRoutingEnabled()` | Indicates whether the automatic audio routing is enabled.

    - ### Methods inherited from class java.lang.Object

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

- - ### Constructor Detail

  - ### Method Detail

    - #### mute

           abstract Unit mute()

      Mutes audio input.

    - #### unmute

           abstract Unit unmute()

      Unmutes audio input.

    - #### enableSpeaker

           abstract Unit enableSpeaker()

      Enables speaker mode.

    - #### disableSpeaker

           abstract Unit disableSpeaker()

      Disables speaker mode.

    - #### setLocalAudioListener

           abstract Unit setLocalAudioListener(LocalAudioListener listener)

      Sets a listener for the local audio listener.

      Parameters:
        `listener` - will be called when the recording is being started, stopped and when new audio buffer is available.

    - #### enableAutomaticAudioRouting

           abstract Unit enableAutomaticAudioRouting(AudioController.AudioRoutingConfig audioRoutingConfig)

      Enables automatic audio routing between earpiece, speakerphone, wired headset and bluetooth audio devices. Priorities are following:

      - Bluetooth (if available and manageBluetoothAudio == true)

      - Wired Headset

      - Default audio device if AudioRoutingConfig.useSpeakerphoneState is UseSpeakerphone.SPEAKERPHONE_TRUE or UseSpeakerphone.SPEAKERPHONE_FALSE, or Proximity sensor's based decision (speakerphone / earpiece) if AudioRoutingConfig.useSpeakerphoneState is UseSpeakerphone.SPEAKERPHONE_AUTO.

      Default audio device (speakerphone/ earpiece) is set using AudioRoutingConfig.useSpeakerphoneState parameter.

      Parameters:
        `audioRoutingConfig` - automatic routing configuration data

    - #### disableAutomaticAudioRouting

           abstract Unit disableAutomaticAudioRouting()

      Disables automatic audio routing (AAR). When AAR is disabled use AudioController.enableSpeaker to toggle between speakerphone and earpiece.

    - #### isMute

           abstract Boolean isMute()

      Indicates whether the microphone is muted.

    - #### isSpeakerOn

           abstract Boolean isSpeakerOn()

      Indicates whether the speaker is enabled.

    - #### isAutomaticAudioRoutingEnabled

           abstract Boolean isAutomaticAudioRoutingEnabled()

      Indicates whether the automatic audio routing is enabled.