|
Agora Java API Reference for Android
|
#include <IAgoraService.h>
Public Member Functions | |
| void | SetAll (const AudioSessionConfiguration &change) |
| bool | operator== (const AudioSessionConfiguration &o) const |
| bool | operator!= (const AudioSessionConfiguration &o) const |
Public Attributes | |
| Optional< bool > | playbackAndRecord |
| Optional< bool > | chatMode |
| Optional< bool > | defaultToSpeaker |
| Optional< bool > | overrideSpeaker |
| Optional< bool > | allowMixWithOthers |
| Optional< bool > | allowDuckOthers |
| Optional< bool > | allowBluetooth |
| Optional< bool > | allowBluetoothA2DP |
| Optional< double > | sampleRate |
| Optional< double > | ioBufferDuration |
| Optional< int > | inputNumberOfChannels |
| Optional< int > | outputNumberOfChannels |
The audio session configurations.
Set these configurations when calling setAudioSessionConfiguration.
| Optional<bool> agora::base::AudioSessionConfiguration::playbackAndRecord |
Whether to enable audio input (recording) and audio output (playback):
true: Enable audio recording and playback.false: Disable audio recording and playback, which prevents audio input and output.allowMixWithOthers as true to allow audio mixing. | Optional<bool> agora::base::AudioSessionConfiguration::chatMode |
Whether to enable chat mode:
true: Enable chat mode. This mode is for apps that are engaged in two-way real-time communication, such as a voice or video chat.false: Disable chat mode.For a video chat, set this member as true and set the audio route to the speaker.
| Optional<bool> agora::base::AudioSessionConfiguration::defaultToSpeaker |
Whether the audio defaults to the built-in speaker:
true: The audio defaults to the built-in speaker.false: The audio does not default to the built-in speaker.playbackAndRecord is set as true. | Optional<bool> agora::base::AudioSessionConfiguration::overrideSpeaker |
Whether to temporarily change the current audio route to the built-in speaker:
true: Set the current audio route to the built-in speaker.false: Do not set the current audio route to the built-in speaker.playbackAndRecord member is set as true. | Optional<bool> agora::base::AudioSessionConfiguration::allowMixWithOthers |
Whether to mix the audio from this session with the audio from active audio sessions in other apps.
true: Mix the audio sessions.false: Do not mix the audio session.playbackAndRecord member is set as true. | Optional<bool> agora::base::AudioSessionConfiguration::allowDuckOthers |
Whether to duck the audio from this session with the audio from active audio sessions in other apps.
true: Duck the audio sessions.false: Do not duck the audio session.playbackAndRecord member is set as true. | Optional<bool> agora::base::AudioSessionConfiguration::allowBluetooth |
Whether to allow Bluetooth handsfree devices to appear as available audio input devices:
true: Allow Bluetooth handsfree devices to appear as available audio input routes.false: Do not allow Bluetooth handsfree devices to appear as available audio input routes.playbackAndRecord member is set as true. | Optional<bool> agora::base::AudioSessionConfiguration::allowBluetoothA2DP |
Whether to allow the audio from this session to be routed to Bluetooth devices that support the Advanced Audio Distribution Profile (A2DP).
true: Allow the audio from this session to be routed to Bluetooth devices that support the Advanced Audio Distribution Profile (A2DP).false: Do not allow the audio from this session to be routed to Bluetooth devices that support the Advanced Audio Distribution Profile (A2DP).playbackAndRecord member is set as true. | Optional<double> agora::base::AudioSessionConfiguration::sampleRate |
The expected audio sample rate (kHz) of this session.
The value range is [8,48]. The actual sample rate may differ based on the audio sampling device in use.
| Optional<double> agora::base::AudioSessionConfiguration::ioBufferDuration |
The expected input and output buffer duration (ms) of this session.
The value range is [0,93]. The actual I/O buffer duration might be lower than the set value based on the hardware in use.
| Optional<int> agora::base::AudioSessionConfiguration::inputNumberOfChannels |
The expected number of input audio channels of this session.
| Optional<int> agora::base::AudioSessionConfiguration::outputNumberOfChannels |
The expected number of output audio channels of this session.
1.8.18