\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
\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
\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]}}

Reports the audio spectrum of local audio.

This callback reports the audio spectrum data of the local audio at the moment in the channel.

You can set the time interval of this callback using enable\+Audio\+Spectrum\+Monitor.


\begin{DoxyParams}{Parameters}
{\em data} & The audio spectrum data of local audio.
\begin{DoxyItemize}
\item true\+: Processed.
\item false\+: Not processed. 
\end{DoxyItemize}\\
\hline
\end{DoxyParams}
\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]}}

Reports the audio spectrum of remote user.

This callback reports the I\+Ds and audio spectrum data of the loudest speakers at the moment in the channel.

You can set the time interval of this callback using enable\+Audio\+Spectrum\+Monitor.


\begin{DoxyParams}{Parameters}
{\em spectrums} & The pointer to \mbox{\hyperlink{structagora_1_1media_1_1_user_audio_spectrum_info}{User\+Audio\+Spectrum\+Info}}, which is an array containing the user ID and audio spectrum data for each speaker.
\begin{DoxyItemize}
\item This array contains the following members\+:
\begin{DoxyItemize}
\item {\ttfamily uid}, which is the U\+ID of each remote speaker
\item {\ttfamily spectrum\+Data}, which reports the audio spectrum of each remote speaker. 
\end{DoxyItemize}
\end{DoxyItemize}\\
\hline
{\em spectrum\+Number} & The array length of the spectrums.
\begin{DoxyItemize}
\item true\+: Processed.
\item false\+: Not processed. 
\end{DoxyItemize}\\
\hline
\end{DoxyParams}
