\hypertarget{structagora_1_1_spatial_audio_params}{}\doxysection{agora\+::Spatial\+Audio\+Params Struct Reference}
\label{structagora_1_1_spatial_audio_params}\index{agora::SpatialAudioParams@{agora::SpatialAudioParams}}


The spatial audio parameters.  




{\ttfamily \#include $<$Agora\+Base.\+h$>$}

\doxysubsection*{Public Attributes}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{classagora_1_1_optional}{Optional}}$<$ double $>$ \mbox{\hyperlink{structagora_1_1_spatial_audio_params_a1072de004d8f03201b6350b8d011a05f}{speaker\+\_\+azimuth}}
\item 
\mbox{\hyperlink{classagora_1_1_optional}{Optional}}$<$ double $>$ \mbox{\hyperlink{structagora_1_1_spatial_audio_params_a39ad6476549e3d1d1378d70aba7fbc84}{speaker\+\_\+elevation}}
\item 
\mbox{\hyperlink{classagora_1_1_optional}{Optional}}$<$ double $>$ \mbox{\hyperlink{structagora_1_1_spatial_audio_params_a923c83558b5e9ed88ca24a8dd6b76391}{speaker\+\_\+distance}}
\item 
\mbox{\hyperlink{classagora_1_1_optional}{Optional}}$<$ int $>$ \mbox{\hyperlink{structagora_1_1_spatial_audio_params_a08a4cd03b9ad6a0699a9d40ea6483a6e}{speaker\+\_\+orientation}}
\item 
\mbox{\hyperlink{classagora_1_1_optional}{Optional}}$<$ bool $>$ \mbox{\hyperlink{structagora_1_1_spatial_audio_params_a8539cc08a52b7306955ddcf3f5a3698a}{enable\+\_\+blur}}
\item 
\mbox{\hyperlink{classagora_1_1_optional}{Optional}}$<$ bool $>$ \mbox{\hyperlink{structagora_1_1_spatial_audio_params_a6592352a3837cc339a2d794effdc1e77}{enable\+\_\+air\+\_\+absorb}}
\item 
\mbox{\hyperlink{classagora_1_1_optional}{Optional}}$<$ double $>$ \mbox{\hyperlink{structagora_1_1_spatial_audio_params_ad7e82f7134bf15294f9a2d72f47fa28e}{speaker\+\_\+attenuation}}
\item 
\mbox{\hyperlink{classagora_1_1_optional}{Optional}}$<$ bool $>$ \mbox{\hyperlink{structagora_1_1_spatial_audio_params_afea5ca0ebeade5f096adb8d41e30114f}{enable\+\_\+doppler}}
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
The spatial audio parameters. 

\doxysubsection{Member Data Documentation}
\mbox{\Hypertarget{structagora_1_1_spatial_audio_params_a1072de004d8f03201b6350b8d011a05f}\label{structagora_1_1_spatial_audio_params_a1072de004d8f03201b6350b8d011a05f}} 
\index{agora::SpatialAudioParams@{agora::SpatialAudioParams}!speaker\_azimuth@{speaker\_azimuth}}
\index{speaker\_azimuth@{speaker\_azimuth}!agora::SpatialAudioParams@{agora::SpatialAudioParams}}
\doxysubsubsection{\texorpdfstring{speaker\_azimuth}{speaker\_azimuth}}
{\footnotesize\ttfamily \mbox{\hyperlink{classagora_1_1_optional}{Optional}}$<$double$>$ agora\+::\+Spatial\+Audio\+Params\+::speaker\+\_\+azimuth}

The azimuth angle of the remote user or media player relative to the local user. The value range is \mbox{[}0,360\mbox{]}, and the unit is degrees, The values are as follows\+:
\begin{DoxyItemize}
\item 0\+: (Default) 0 degrees, which means directly in front on the horizontal plane.
\item 90\+: 90 degrees, which means directly to the left on the horizontal plane.
\item 180\+: 180 degrees, which means directly behind on the horizontal plane.
\item 270\+: 270 degrees, which means directly to the right on the horizontal plane.
\item 360\+: 360 degrees, which means directly in front on the horizontal plane. 
\end{DoxyItemize}\mbox{\Hypertarget{structagora_1_1_spatial_audio_params_a39ad6476549e3d1d1378d70aba7fbc84}\label{structagora_1_1_spatial_audio_params_a39ad6476549e3d1d1378d70aba7fbc84}} 
\index{agora::SpatialAudioParams@{agora::SpatialAudioParams}!speaker\_elevation@{speaker\_elevation}}
\index{speaker\_elevation@{speaker\_elevation}!agora::SpatialAudioParams@{agora::SpatialAudioParams}}
\doxysubsubsection{\texorpdfstring{speaker\_elevation}{speaker\_elevation}}
{\footnotesize\ttfamily \mbox{\hyperlink{classagora_1_1_optional}{Optional}}$<$double$>$ agora\+::\+Spatial\+Audio\+Params\+::speaker\+\_\+elevation}

The elevation angle of the remote user or media player relative to the local user. The value range is \mbox{[}-\/90,90\mbox{]}, and the unit is degrees, The values are as follows\+:
\begin{DoxyItemize}
\item 0\+: (Default) 0 degrees, which means that the horizontal plane is not rotated.
\item -\/90\+: -\/90 degrees, which means that the horizontal plane is rotated 90 degrees downwards.
\item 90\+: 90 degrees, which means that the horizontal plane is rotated 90 degrees upwards. 
\end{DoxyItemize}\mbox{\Hypertarget{structagora_1_1_spatial_audio_params_a923c83558b5e9ed88ca24a8dd6b76391}\label{structagora_1_1_spatial_audio_params_a923c83558b5e9ed88ca24a8dd6b76391}} 
\index{agora::SpatialAudioParams@{agora::SpatialAudioParams}!speaker\_distance@{speaker\_distance}}
\index{speaker\_distance@{speaker\_distance}!agora::SpatialAudioParams@{agora::SpatialAudioParams}}
\doxysubsubsection{\texorpdfstring{speaker\_distance}{speaker\_distance}}
{\footnotesize\ttfamily \mbox{\hyperlink{classagora_1_1_optional}{Optional}}$<$double$>$ agora\+::\+Spatial\+Audio\+Params\+::speaker\+\_\+distance}

The distance of the remote user or media player relative to the local user. The value range is \mbox{[}1,50\mbox{]}, and the unit is meters. The default value is 1 meter. \mbox{\Hypertarget{structagora_1_1_spatial_audio_params_a08a4cd03b9ad6a0699a9d40ea6483a6e}\label{structagora_1_1_spatial_audio_params_a08a4cd03b9ad6a0699a9d40ea6483a6e}} 
\index{agora::SpatialAudioParams@{agora::SpatialAudioParams}!speaker\_orientation@{speaker\_orientation}}
\index{speaker\_orientation@{speaker\_orientation}!agora::SpatialAudioParams@{agora::SpatialAudioParams}}
\doxysubsubsection{\texorpdfstring{speaker\_orientation}{speaker\_orientation}}
{\footnotesize\ttfamily \mbox{\hyperlink{classagora_1_1_optional}{Optional}}$<$int$>$ agora\+::\+Spatial\+Audio\+Params\+::speaker\+\_\+orientation}

The orientation of the remote user or media player relative to the local user. The value range is \mbox{[}0,180\mbox{]}, and the unit is degrees, The values are as follows\+:
\begin{DoxyItemize}
\item 0\+: (Default) 0 degrees, which means that the sound source and listener face the same direction.
\item 180\+: 180 degrees, which means that the sound source and listener face each other. 
\end{DoxyItemize}\mbox{\Hypertarget{structagora_1_1_spatial_audio_params_a8539cc08a52b7306955ddcf3f5a3698a}\label{structagora_1_1_spatial_audio_params_a8539cc08a52b7306955ddcf3f5a3698a}} 
\index{agora::SpatialAudioParams@{agora::SpatialAudioParams}!enable\_blur@{enable\_blur}}
\index{enable\_blur@{enable\_blur}!agora::SpatialAudioParams@{agora::SpatialAudioParams}}
\doxysubsubsection{\texorpdfstring{enable\_blur}{enable\_blur}}
{\footnotesize\ttfamily \mbox{\hyperlink{classagora_1_1_optional}{Optional}}$<$bool$>$ agora\+::\+Spatial\+Audio\+Params\+::enable\+\_\+blur}

Whether to enable audio blurring\+:
\begin{DoxyItemize}
\item {\ttfamily true}\+: Enable audio blurring.
\item {\ttfamily false}\+: (Default) Disable audio blurring. 
\end{DoxyItemize}\mbox{\Hypertarget{structagora_1_1_spatial_audio_params_a6592352a3837cc339a2d794effdc1e77}\label{structagora_1_1_spatial_audio_params_a6592352a3837cc339a2d794effdc1e77}} 
\index{agora::SpatialAudioParams@{agora::SpatialAudioParams}!enable\_air\_absorb@{enable\_air\_absorb}}
\index{enable\_air\_absorb@{enable\_air\_absorb}!agora::SpatialAudioParams@{agora::SpatialAudioParams}}
\doxysubsubsection{\texorpdfstring{enable\_air\_absorb}{enable\_air\_absorb}}
{\footnotesize\ttfamily \mbox{\hyperlink{classagora_1_1_optional}{Optional}}$<$bool$>$ agora\+::\+Spatial\+Audio\+Params\+::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.
\begin{DoxyItemize}
\item {\ttfamily true}\+: (Default) Enable air absorption. Make sure that the value of {\ttfamily speaker\+\_\+attenuation} is not {\ttfamily 0}; otherwise, this setting does not take effect.
\item {\ttfamily false}\+: Disable air absorption. 
\end{DoxyItemize}\mbox{\Hypertarget{structagora_1_1_spatial_audio_params_ad7e82f7134bf15294f9a2d72f47fa28e}\label{structagora_1_1_spatial_audio_params_ad7e82f7134bf15294f9a2d72f47fa28e}} 
\index{agora::SpatialAudioParams@{agora::SpatialAudioParams}!speaker\_attenuation@{speaker\_attenuation}}
\index{speaker\_attenuation@{speaker\_attenuation}!agora::SpatialAudioParams@{agora::SpatialAudioParams}}
\doxysubsubsection{\texorpdfstring{speaker\_attenuation}{speaker\_attenuation}}
{\footnotesize\ttfamily \mbox{\hyperlink{classagora_1_1_optional}{Optional}}$<$double$>$ agora\+::\+Spatial\+Audio\+Params\+::speaker\+\_\+attenuation}

The sound attenuation coefficient of the remote user or media player. The value range is \mbox{[}0,1\mbox{]}. The values are as follows\+:
\begin{DoxyItemize}
\item 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.
\item (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. {\ttfamily enable\+\_\+air\+\_\+absorb} needs to be enabled at the same time.
\item 0.\+5\+: (Default) Simulates the attenuation of the volume in the real environment; the effect is equivalent to not setting the {\ttfamily speaker\+\_\+attenuation} parameter.
\item (0.\+5,1\mbox{]}\+: Strong attenuation mode, where volume and timbre attenuate rapidly during the propagation. {\ttfamily enable\+\_\+air\+\_\+absorb} needs to be enabled at the same time. 
\end{DoxyItemize}\mbox{\Hypertarget{structagora_1_1_spatial_audio_params_afea5ca0ebeade5f096adb8d41e30114f}\label{structagora_1_1_spatial_audio_params_afea5ca0ebeade5f096adb8d41e30114f}} 
\index{agora::SpatialAudioParams@{agora::SpatialAudioParams}!enable\_doppler@{enable\_doppler}}
\index{enable\_doppler@{enable\_doppler}!agora::SpatialAudioParams@{agora::SpatialAudioParams}}
\doxysubsubsection{\texorpdfstring{enable\_doppler}{enable\_doppler}}
{\footnotesize\ttfamily \mbox{\hyperlink{classagora_1_1_optional}{Optional}}$<$bool$>$ agora\+::\+Spatial\+Audio\+Params\+::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.
\begin{DoxyItemize}
\item {\ttfamily true}\+: Enable the Doppler effect.
\item {\ttfamily false}\+: (Default) Disable the Doppler effect. \begin{DoxyNote}{Note}

\end{DoxyNote}

\item This parameter is suitable for scenarios where the sound source is moving at high speed (for example, racing games). It is not recommended for common audio and video interactive scenarios (for example, voice chat, co-\/streaming, or online K\+TV).
\item When this parameter is enabled, Agora recommends that you set a regular period (such as 30 ms), and then call the {\ttfamily update\+Player\+Position\+Info}, {\ttfamily update\+Self\+Position}, and {\ttfamily update\+Remote\+Position} 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. 
\end{DoxyItemize}