\hypertarget{classagora_1_1media_1_1_i_audio_spectrum_observer}{}\doxysection{agora\+::media\+::I\+Audio\+Spectrum\+Observer Class Reference}
\label{classagora_1_1media_1_1_i_audio_spectrum_observer}\index{agora::media::IAudioSpectrumObserver@{agora::media::IAudioSpectrumObserver}}


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

\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual bool \mbox{\hyperlink{classagora_1_1media_1_1_i_audio_spectrum_observer_aeb2d9258d376923242511bab3090a624}{on\+Local\+Audio\+Spectrum}} (const \mbox{\hyperlink{structagora_1_1media_1_1_audio_spectrum_data}{Audio\+Spectrum\+Data}} \&data)=0
\begin{DoxyCompactList}\small\item\em Gets the statistics of a local audio spectrum. \end{DoxyCompactList}\item 
virtual bool \mbox{\hyperlink{classagora_1_1media_1_1_i_audio_spectrum_observer_a4d7dbdef431464347d38c8d9be5c6e8d}{on\+Remote\+Audio\+Spectrum}} (const \mbox{\hyperlink{structagora_1_1media_1_1_user_audio_spectrum_info}{User\+Audio\+Spectrum\+Info}} $\ast$spectrums, unsigned int spectrum\+Number)=0
\begin{DoxyCompactList}\small\item\em Gets the remote audio spectrum. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
The \mbox{\hyperlink{classagora_1_1media_1_1_i_audio_spectrum_observer}{I\+Audio\+Spectrum\+Observer}} class. 

\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{classagora_1_1media_1_1_i_audio_spectrum_observer_aeb2d9258d376923242511bab3090a624}\label{classagora_1_1media_1_1_i_audio_spectrum_observer_aeb2d9258d376923242511bab3090a624}} 
\index{agora::media::IAudioSpectrumObserver@{agora::media::IAudioSpectrumObserver}!onLocalAudioSpectrum@{onLocalAudioSpectrum}}
\index{onLocalAudioSpectrum@{onLocalAudioSpectrum}!agora::media::IAudioSpectrumObserver@{agora::media::IAudioSpectrumObserver}}
\doxysubsubsection{\texorpdfstring{onLocalAudioSpectrum()}{onLocalAudioSpectrum()}}
{\footnotesize\ttfamily virtual bool agora\+::media\+::\+I\+Audio\+Spectrum\+Observer\+::on\+Local\+Audio\+Spectrum (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structagora_1_1media_1_1_audio_spectrum_data}{Audio\+Spectrum\+Data}} \&}]{data }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



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{classagora_1_1media_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{structagora_1_1media_1_1_audio_spectrum_data}{Audio\+Spectrum\+Data}}}.\\
\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{classagora_1_1media_1_1_i_audio_spectrum_observer_a4d7dbdef431464347d38c8d9be5c6e8d}\label{classagora_1_1media_1_1_i_audio_spectrum_observer_a4d7dbdef431464347d38c8d9be5c6e8d}} 
\index{agora::media::IAudioSpectrumObserver@{agora::media::IAudioSpectrumObserver}!onRemoteAudioSpectrum@{onRemoteAudioSpectrum}}
\index{onRemoteAudioSpectrum@{onRemoteAudioSpectrum}!agora::media::IAudioSpectrumObserver@{agora::media::IAudioSpectrumObserver}}
\doxysubsubsection{\texorpdfstring{onRemoteAudioSpectrum()}{onRemoteAudioSpectrum()}}
{\footnotesize\ttfamily virtual bool agora\+::media\+::\+I\+Audio\+Spectrum\+Observer\+::on\+Remote\+Audio\+Spectrum (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structagora_1_1media_1_1_user_audio_spectrum_info}{User\+Audio\+Spectrum\+Info}} $\ast$}]{spectrums,  }\item[{unsigned int}]{spectrum\+Number }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



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{classagora_1_1media_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 spectrums} & The audio spectrum information of the remote user. See {\ttfamily \mbox{\hyperlink{structagora_1_1media_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}
