|
Agora Java API Reference for Android
|
The spatial audio parameters. More...
#include <AgoraBase.h>
Public Attributes | |
| Optional< double > | speaker_azimuth |
| Optional< double > | speaker_elevation |
| Optional< double > | speaker_distance |
| Optional< int > | speaker_orientation |
| Optional< bool > | enable_blur |
| Optional< bool > | enable_air_absorb |
| Optional< double > | speaker_attenuation |
| Optional< bool > | enable_doppler |
The spatial audio parameters.
| Optional<double> agora::SpatialAudioParams::speaker_azimuth |
The azimuth angle of the remote user or media player relative to the local user. The value range is [0,360], and the unit is degrees, The values are as follows:
| Optional<double> agora::SpatialAudioParams::speaker_elevation |
The elevation angle of the remote user or media player relative to the local user. The value range is [-90,90], and the unit is degrees, The values are as follows:
| Optional<double> agora::SpatialAudioParams::speaker_distance |
The distance of the remote user or media player relative to the local user. The value range is [1,50], and the unit is meters. The default value is 1 meter.
| Optional<int> agora::SpatialAudioParams::speaker_orientation |
The orientation of the remote user or media player relative to the local user. The value range is [0,180], and the unit is degrees, The values are as follows:
| Optional<bool> agora::SpatialAudioParams::enable_blur |
Whether to enable audio blurring:
true: Enable audio blurring.false: (Default) Disable audio blurring. | Optional<bool> agora::SpatialAudioParams::enable_air_absorb |
Whether to enable air absorption, that is, to simulate the sound attenuation effect of sound transmitting in the air; under a certain transmission distance, the attenuation speed of high-frequency sound is fast, and the attenuation speed of low-frequency sound is slow.
true: (Default) Enable air absorption. Make sure that the value of speaker_attenuation is not 0; otherwise, this setting does not take effect.false: Disable air absorption. | Optional<double> agora::SpatialAudioParams::speaker_attenuation |
The sound attenuation coefficient of the remote user or media player. The value range is [0,1]. The values are as follows:
enable_air_absorb needs to be enabled at the same time.speaker_attenuation parameter.enable_air_absorb needs to be enabled at the same time. | Optional<bool> agora::SpatialAudioParams::enable_doppler |
Whether to enable the Doppler effect: When there is a relative displacement between the sound source and the receiver of the sound source, the tone heard by the receiver changes.
true: Enable the Doppler effect.false: (Default) Disable the Doppler effect. updatePlayerPositionInfo, updateSelfPosition, and updateRemotePosition methods to continuously update the relative distance between the sound source and the receiver. The following factors can cause the Doppler effect to be unpredictable or the sound to be jittery: the period of updating the distance is too long, the updating period is irregular, or the distance information is lost due to network packet loss or delay.
1.8.18