|
Agora Java API Reference for Android
|
The spatial audio parameters. More...
Public Member Functions | |
| Double | getSpeakerAzimuth () |
| Double | getSpeakerElevation () |
| Double | getSpeakerDistance () |
| Integer | getSpeakerOrientation () |
| Boolean | getBlurFlag () |
| Boolean | getAirAbsorbFlag () |
| Double | getSpeakerAttenuation () |
| Boolean | getDopplerFlag () |
Public Attributes | |
| Double | speaker_azimuth |
| Double | speaker_elevation |
| Double | speaker_distance |
| Integer | speaker_orientation |
| Boolean | enable_blur |
| Boolean | enable_air_absorb |
| Double | speaker_attenuation |
| Boolean | enable_doppler |
The spatial audio parameters.
| Double io.agora.rtc2.SpatialAudioParams.getSpeakerAzimuth | ( | ) |
get speaker azimuth
| Double io.agora.rtc2.SpatialAudioParams.getSpeakerElevation | ( | ) |
get speaker elevation
| Double io.agora.rtc2.SpatialAudioParams.getSpeakerDistance | ( | ) |
get speaker distance
| Integer io.agora.rtc2.SpatialAudioParams.getSpeakerOrientation | ( | ) |
get speaker orientation
| Boolean io.agora.rtc2.SpatialAudioParams.getBlurFlag | ( | ) |
get blur enabled flag
| Boolean io.agora.rtc2.SpatialAudioParams.getAirAbsorbFlag | ( | ) |
get air absorb enabled flag
| Double io.agora.rtc2.SpatialAudioParams.getSpeakerAttenuation | ( | ) |
get speaker attenuation
| Double io.agora.rtc2.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:
| Double io.agora.rtc2.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:
| Double io.agora.rtc2.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.
| Integer io.agora.rtc2.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:
| Boolean io.agora.rtc2.SpatialAudioParams.enable_blur |
Whether to enable audio blurring:
true: Enable audio blurring.false: (Default) Disable audio blurring. | Boolean io.agora.rtc2.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. | Double io.agora.rtc2.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. | Boolean io.agora.rtc2.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