public interface AudioController
AudioController
object is only valid while the SinchClient is started. As soon as the
SinchClient is stopped, this object is invalidated and must not be
used.
Please see enableAutomaticAudioRouting(boolean, com.sinch.android.rtc.AudioController.UseSpeakerphone) for advanced automatic audio routing options.| Modifier and Type | Interface and Description |
|---|---|
static class |
AudioController.UseSpeakerphone |
| Modifier and Type | Method and Description |
|---|---|
void |
disableAutomaticAudioRouting()
Disables automatic audio routing (AAR).
|
void |
disableSpeaker()
Disables speaker mode.
|
void |
enableAutomaticAudioRouting(boolean manageBluetoothAudio,
AudioController.UseSpeakerphone useSpeakerphone)
Enables automatic audio routing between earpiece, speakerphone, wired headset and bluetooth audio devices.
|
void |
enableSpeaker()
Enables speaker mode.
|
boolean |
isAutomaticAudioRoutingEnabled()
Checks whether the automatic audio routing is enabled.
|
boolean |
isMute()
Checks whether the microphone is mute.
|
boolean |
isSpeakerOn()
Checks whether the speaker is enabled.
|
void |
mute()
Mutes audio input.
|
void |
setLocalAudioListener(LocalAudioListener listener)
Sets a listener for the local audio listener.
|
void |
unmute()
Unmutes audio input.
|
void mute()
void unmute()
boolean isMute()
void enableSpeaker()
void disableSpeaker()
boolean isSpeakerOn()
void setLocalAudioListener(LocalAudioListener listener)
listener - will be called when the recording is being started, stopped and
when new audio buffer is available.LocalAudioListenervoid enableAutomaticAudioRouting(boolean manageBluetoothAudio,
AudioController.UseSpeakerphone useSpeakerphone)
Enables automatic audio routing between earpiece, speakerphone, wired headset and bluetooth audio devices.
Priorities are following:useSpeakerphone is TRUE or FALSE, or Proximity sensor's based decision (speakerphone / earpiece) if useSpeakerphone is AUTO.useSpeakerphone parameter.
Throws MissingPermissionException if manageBluetoothAudio is set to true and android.Manifest.permission.BLUETOOTH is not granted.manageBluetoothAudio - if set to true, allows to automatically reroute audio to Bluetooth headset when available. Fires MissingPermissionException if android.Manifest.permission.BLUETOOTH is not granted.useSpeakerphone - can be set to AudioController.UseSpeakerphone AUTO, TRUE or FALSE. AUTO mode uses proximity sensor to operate.void disableAutomaticAudioRouting()
boolean isAutomaticAudioRoutingEnabled()
Copyright 2016, Sinch AB