\hypertarget{interfaceio_1_1agora_1_1rtc2_1_1audio_1_1_i_audio_spectrum_observer}{}\doxysection{io.\+agora.\+rtc2.\+audio.\+I\+Audio\+Spectrum\+Observer Interface Reference}
\label{interfaceio_1_1agora_1_1rtc2_1_1audio_1_1_i_audio_spectrum_observer}\index{io.agora.rtc2.audio.IAudioSpectrumObserver@{io.agora.rtc2.audio.IAudioSpectrumObserver}}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
boolean \mbox{\hyperlink{interfaceio_1_1agora_1_1rtc2_1_1audio_1_1_i_audio_spectrum_observer_a22dc1ca1c565907e66575e713e16d816}{on\+Local\+Audio\+Spectrum}} (\mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1audio_1_1_audio_spectrum_info}{Audio\+Spectrum\+Info}} data)
\begin{DoxyCompactList}\small\item\em Gets the statistics of a local audio spectrum. \end{DoxyCompactList}\item 
boolean \mbox{\hyperlink{interfaceio_1_1agora_1_1rtc2_1_1audio_1_1_i_audio_spectrum_observer_a4c6bf9fe7980158a5bca8e9eac029e4e}{on\+Remote\+Audio\+Spectrum}} (\mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1audio_1_1_user_audio_spectrum_info}{User\+Audio\+Spectrum\+Info}}\mbox{[}$\,$\mbox{]} user\+Audio\+Spectrum\+Infos, int spectrum\+Number)
\begin{DoxyCompactList}\small\item\em Gets the remote audio spectrum. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
The \mbox{\hyperlink{interfaceio_1_1agora_1_1rtc2_1_1audio_1_1_i_audio_spectrum_observer}{I\+Audio\+Spectrum\+Observer}} interface. 

\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{interfaceio_1_1agora_1_1rtc2_1_1audio_1_1_i_audio_spectrum_observer_a22dc1ca1c565907e66575e713e16d816}\label{interfaceio_1_1agora_1_1rtc2_1_1audio_1_1_i_audio_spectrum_observer_a22dc1ca1c565907e66575e713e16d816}} 
\index{io.agora.rtc2.audio.IAudioSpectrumObserver@{io.agora.rtc2.audio.IAudioSpectrumObserver}!onLocalAudioSpectrum@{onLocalAudioSpectrum}}
\index{onLocalAudioSpectrum@{onLocalAudioSpectrum}!io.agora.rtc2.audio.IAudioSpectrumObserver@{io.agora.rtc2.audio.IAudioSpectrumObserver}}
\doxysubsubsection{\texorpdfstring{onLocalAudioSpectrum()}{onLocalAudioSpectrum()}}
{\footnotesize\ttfamily boolean io.\+agora.\+rtc2.\+audio.\+I\+Audio\+Spectrum\+Observer.\+on\+Local\+Audio\+Spectrum (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1audio_1_1_audio_spectrum_info}{Audio\+Spectrum\+Info}}}]{data }\end{DoxyParamCaption})}



Gets the statistics of a local audio spectrum. 

After successfully calling {\ttfamily register\+Audio\+Spectrum\+Observer} to implement the {\ttfamily on\+Local\+Audio\+Spectrum} callback in {\ttfamily \mbox{\hyperlink{interfaceio_1_1agora_1_1rtc2_1_1audio_1_1_i_audio_spectrum_observer}{I\+Audio\+Spectrum\+Observer}}} and calling {\ttfamily enable\+Audio\+Spectrum\+Monitor} to enable audio spectrum monitoring, the S\+DK triggers this callback as the time interval you set to report the received remote audio data spectrum before encoding.


\begin{DoxyParams}{Parameters}
{\em data} & The audio spectrum data of the local user. See {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1audio_1_1_audio_spectrum_info}{Audio\+Spectrum\+Info}}}.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Whether the spectrum data is received\+:
\begin{DoxyItemize}
\item {\ttfamily true}\+: Spectrum data is received.
\item {\ttfamily false}\+: No spectrum data is received. 
\end{DoxyItemize}
\end{DoxyReturn}
\mbox{\Hypertarget{interfaceio_1_1agora_1_1rtc2_1_1audio_1_1_i_audio_spectrum_observer_a4c6bf9fe7980158a5bca8e9eac029e4e}\label{interfaceio_1_1agora_1_1rtc2_1_1audio_1_1_i_audio_spectrum_observer_a4c6bf9fe7980158a5bca8e9eac029e4e}} 
\index{io.agora.rtc2.audio.IAudioSpectrumObserver@{io.agora.rtc2.audio.IAudioSpectrumObserver}!onRemoteAudioSpectrum@{onRemoteAudioSpectrum}}
\index{onRemoteAudioSpectrum@{onRemoteAudioSpectrum}!io.agora.rtc2.audio.IAudioSpectrumObserver@{io.agora.rtc2.audio.IAudioSpectrumObserver}}
\doxysubsubsection{\texorpdfstring{onRemoteAudioSpectrum()}{onRemoteAudioSpectrum()}}
{\footnotesize\ttfamily boolean io.\+agora.\+rtc2.\+audio.\+I\+Audio\+Spectrum\+Observer.\+on\+Remote\+Audio\+Spectrum (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1audio_1_1_user_audio_spectrum_info}{User\+Audio\+Spectrum\+Info}}\mbox{[}$\,$\mbox{]}}]{user\+Audio\+Spectrum\+Infos,  }\item[{int}]{spectrum\+Number }\end{DoxyParamCaption})}



Gets the remote audio spectrum. 

After successfully calling {\ttfamily register\+Audio\+Spectrum\+Observer} to implement the {\ttfamily on\+Remote\+Audio\+Spectrum} callback in the {\ttfamily \mbox{\hyperlink{interfaceio_1_1agora_1_1rtc2_1_1audio_1_1_i_audio_spectrum_observer}{I\+Audio\+Spectrum\+Observer}}} and calling {\ttfamily enable\+Audio\+Spectrum\+Monitor} to enable audio spectrum monitoring, the S\+DK will trigger the callback as the time interval you set to report the received remote audio data spectrum.


\begin{DoxyParams}{Parameters}
{\em user\+Audio\+Spectrum\+Infos} & The audio spectrum information of the remote user. See {\ttfamily \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1audio_1_1_user_audio_spectrum_info}{User\+Audio\+Spectrum\+Info}}}. The number of arrays is the number of remote users monitored by the S\+DK. If the array is null, it means that no audio spectrum of remote users is detected. \\
\hline
{\em spectrum\+Number} & The number of remote users.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Whether the spectrum data is received\+:
\begin{DoxyItemize}
\item {\ttfamily true}\+: Spectrum data is received.
\item {\ttfamily false}\+: No spectrum data is received. 
\end{DoxyItemize}
\end{DoxyReturn}
