Package io.agora.rtc2

Class SpatialAudioParams

java.lang.Object
io.agora.rtc2.SpatialAudioParams

public class SpatialAudioParams extends Object
  • Field Details

    • speaker_azimuth

      public Double 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: - 0: (Default) 0 degrees, which means directly in front on the horizontal plane. - 90: 90 degrees, which means directly to the left on the horizontal plane. - 180: 180 degrees, which means directly behind on the horizontal plane. - 270: 270 degrees, which means directly to the right on the horizontal plane. - 360: 360 degrees, which means directly in front on the horizontal plane.
    • speaker_elevation

      public Double 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: - 0: (Default) 0 degrees, which means that the horizontal plane is not rotated. - -90: -90 degrees, which means that the horizontal plane is rotated 90 degrees downwards. - 90: 90 degrees, which means that the horizontal plane is rotated 90 degrees upwards.
    • speaker_distance

      public Double 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.
    • speaker_orientation

      public Integer 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: - 0: (Default) 0 degrees, which means that the sound source and listener face the same direction. - 180: 180 degrees, which means that the sound source and listener face each other.
    • enable_blur

      public Boolean enable_blur
      Whether to enable audio blurring: - `true`: Enable audio blurring. - `false`: (Default) Disable audio blurring.
    • enable_air_absorb

      public Boolean 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.
    • speaker_attenuation

      public Double speaker_attenuation
      The sound attenuation coefficient of the remote user or media player. The value range is [0,1]. The values are as follows: - 0: Broadcast mode, where the volume and timbre are not attenuated with distance, and the volume and timbre heard by local users do not change regardless of distance. - (0,0.5): Weak attenuation mode, where the volume and timbre only have a weak attenuation during the propagation, and the sound can travel farther than that in a real environment. `enable_air_absorb` needs to be enabled at the same time. - 0.5: (Default) Simulates the attenuation of the volume in the real environment; the effect is equivalent to not setting the `speaker_attenuation` parameter. - (0.5,1]: Strong attenuation mode, where volume and timbre attenuate rapidly during the propagation. `enable_air_absorb` needs to be enabled at the same time.
    • enable_doppler

      public Boolean 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.
  • Constructor Details

    • SpatialAudioParams

      public SpatialAudioParams()
  • Method Details

    • getSpeakerAzimuth

      public Double getSpeakerAzimuth()
      get speaker azimuth
    • getSpeakerElevation

      public Double getSpeakerElevation()
      get speaker elevation
    • getSpeakerDistance

      public Double getSpeakerDistance()
      get speaker distance
    • getSpeakerOrientation

      public Integer getSpeakerOrientation()
      get speaker orientation
    • getBlurFlag

      public Boolean getBlurFlag()
      get blur enabled flag
    • getAirAbsorbFlag

      public Boolean getAirAbsorbFlag()
      get air absorb enabled flag
    • getSpeakerAttenuation

      public Double getSpeakerAttenuation()
      get speaker attenuation
    • getDopplerFlag

      public Boolean getDopplerFlag()