\hypertarget{structagora_1_1media_1_1_i_audio_frame_observer_base_1_1_audio_params}{}\doxysection{agora\+::media\+::I\+Audio\+Frame\+Observer\+Base\+::Audio\+Params Struct Reference}
\label{structagora_1_1media_1_1_i_audio_frame_observer_base_1_1_audio_params}\index{agora::media::IAudioFrameObserverBase::AudioParams@{agora::media::IAudioFrameObserverBase::AudioParams}}


Audio data format.  




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

\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{structagora_1_1media_1_1_i_audio_frame_observer_base_1_1_audio_params_aa69dfb0f58e24d685db8a7eb4f2e3375}\label{structagora_1_1media_1_1_i_audio_frame_observer_base_1_1_audio_params_aa69dfb0f58e24d685db8a7eb4f2e3375}} 
{\bfseries Audio\+Params} (int samplerate, int channel, rtc\+::\+R\+A\+W\+\_\+\+A\+U\+D\+I\+O\+\_\+\+F\+R\+A\+M\+E\+\_\+\+O\+P\+\_\+\+M\+O\+D\+E\+\_\+\+T\+Y\+PE type, int samples\+Per\+Call)
\end{DoxyCompactItemize}
\doxysubsection*{Public Attributes}
\begin{DoxyCompactItemize}
\item 
int \mbox{\hyperlink{structagora_1_1media_1_1_i_audio_frame_observer_base_1_1_audio_params_a7242f1619148fce5be00a22d9d50ae3f}{sample\+\_\+rate}}
\item 
int \mbox{\hyperlink{structagora_1_1media_1_1_i_audio_frame_observer_base_1_1_audio_params_ad6462a2db8f24270d400db3f9bf3e60f}{channels}}
\item 
rtc\+::\+R\+A\+W\+\_\+\+A\+U\+D\+I\+O\+\_\+\+F\+R\+A\+M\+E\+\_\+\+O\+P\+\_\+\+M\+O\+D\+E\+\_\+\+T\+Y\+PE \mbox{\hyperlink{structagora_1_1media_1_1_i_audio_frame_observer_base_1_1_audio_params_ad7fd9792b4c3c64d48d84dbb89fff7d4}{mode}}
\item 
int \mbox{\hyperlink{structagora_1_1media_1_1_i_audio_frame_observer_base_1_1_audio_params_a5472c413e05754679e256cbc17312be1}{samples\+\_\+per\+\_\+call}}
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Audio data format. 

You can pass the {\ttfamily \mbox{\hyperlink{structagora_1_1media_1_1_i_audio_frame_observer_base_1_1_audio_params}{Audio\+Params}}} object in the following A\+P\+Is to set the audio data format for the corresponding callback\+:
\begin{DoxyItemize}
\item {\ttfamily get\+Record\+Audio\+Params}\+: Sets the audio data format for the {\ttfamily on\+Record\+Audio\+Frame} callback.
\item {\ttfamily get\+Playback\+Audio\+Params}\+: Sets the audio data format for the {\ttfamily on\+Playback\+Audio\+Frame} callback.
\item {\ttfamily get\+Mixed\+Audio\+Params}\+: Sets the audio data format for the {\ttfamily on\+Mixed\+Audio\+Frame} callback.
\item {\ttfamily get\+Ear\+Monitoring\+Audio\+Params}\+: Sets the audio data format for the {\ttfamily on\+Ear\+Monitoring\+Audio\+Frame} callback.
\end{DoxyItemize}

\begin{DoxyNote}{Note}

\begin{DoxyItemize}
\item The S\+DK calculates the sampling interval through the {\ttfamily samples\+Per\+Call}, {\ttfamily sample\+Rate}, and {\ttfamily channel} parameters in {\ttfamily \mbox{\hyperlink{structagora_1_1media_1_1_i_audio_frame_observer_base_1_1_audio_params}{Audio\+Params}}}, and triggers the {\ttfamily on\+Record\+Audio\+Frame}, {\ttfamily on\+Playback\+Audio\+Frame}, {\ttfamily on\+Mixed\+Audio\+Frame}, and {\ttfamily on\+Ear\+Monitoring\+Audio\+Frame} callbacks according to the sampling interval.
\item Sample interval (sec) = {\ttfamily sample\+Per\+Call} /( {\ttfamily sample\+Rate} × {\ttfamily channel} ).
\item Ensure that the sample interval ≥ 0.\+01 (s). 
\end{DoxyItemize}
\end{DoxyNote}


\doxysubsection{Member Data Documentation}
\mbox{\Hypertarget{structagora_1_1media_1_1_i_audio_frame_observer_base_1_1_audio_params_a7242f1619148fce5be00a22d9d50ae3f}\label{structagora_1_1media_1_1_i_audio_frame_observer_base_1_1_audio_params_a7242f1619148fce5be00a22d9d50ae3f}} 
\index{agora::media::IAudioFrameObserverBase::AudioParams@{agora::media::IAudioFrameObserverBase::AudioParams}!sample\_rate@{sample\_rate}}
\index{sample\_rate@{sample\_rate}!agora::media::IAudioFrameObserverBase::AudioParams@{agora::media::IAudioFrameObserverBase::AudioParams}}
\doxysubsubsection{\texorpdfstring{sample\_rate}{sample\_rate}}
{\footnotesize\ttfamily int agora\+::media\+::\+I\+Audio\+Frame\+Observer\+Base\+::\+Audio\+Params\+::sample\+\_\+rate}

The audio sample rate (Hz), which can be set as one of the following values\+:
\begin{DoxyItemize}
\item 8000.
\item (Default) 16000.
\item 32000.
\item 44100
\item 48000 
\end{DoxyItemize}\mbox{\Hypertarget{structagora_1_1media_1_1_i_audio_frame_observer_base_1_1_audio_params_ad6462a2db8f24270d400db3f9bf3e60f}\label{structagora_1_1media_1_1_i_audio_frame_observer_base_1_1_audio_params_ad6462a2db8f24270d400db3f9bf3e60f}} 
\index{agora::media::IAudioFrameObserverBase::AudioParams@{agora::media::IAudioFrameObserverBase::AudioParams}!channels@{channels}}
\index{channels@{channels}!agora::media::IAudioFrameObserverBase::AudioParams@{agora::media::IAudioFrameObserverBase::AudioParams}}
\doxysubsubsection{\texorpdfstring{channels}{channels}}
{\footnotesize\ttfamily int agora\+::media\+::\+I\+Audio\+Frame\+Observer\+Base\+::\+Audio\+Params\+::channels}

The number of audio channels, which can be set as either of the following values\+:
\begin{DoxyItemize}
\item 1\+: (Default) Mono.
\item 2\+: Stereo. 
\end{DoxyItemize}\mbox{\Hypertarget{structagora_1_1media_1_1_i_audio_frame_observer_base_1_1_audio_params_ad7fd9792b4c3c64d48d84dbb89fff7d4}\label{structagora_1_1media_1_1_i_audio_frame_observer_base_1_1_audio_params_ad7fd9792b4c3c64d48d84dbb89fff7d4}} 
\index{agora::media::IAudioFrameObserverBase::AudioParams@{agora::media::IAudioFrameObserverBase::AudioParams}!mode@{mode}}
\index{mode@{mode}!agora::media::IAudioFrameObserverBase::AudioParams@{agora::media::IAudioFrameObserverBase::AudioParams}}
\doxysubsubsection{\texorpdfstring{mode}{mode}}
{\footnotesize\ttfamily rtc\+::\+R\+A\+W\+\_\+\+A\+U\+D\+I\+O\+\_\+\+F\+R\+A\+M\+E\+\_\+\+O\+P\+\_\+\+M\+O\+D\+E\+\_\+\+T\+Y\+PE agora\+::media\+::\+I\+Audio\+Frame\+Observer\+Base\+::\+Audio\+Params\+::mode}

The use mode of the audio data. See {\ttfamily R\+A\+W\+\_\+\+A\+U\+D\+I\+O\+\_\+\+F\+R\+A\+M\+E\+\_\+\+O\+P\+\_\+\+M\+O\+D\+E\+\_\+\+T\+Y\+PE}. \mbox{\Hypertarget{structagora_1_1media_1_1_i_audio_frame_observer_base_1_1_audio_params_a5472c413e05754679e256cbc17312be1}\label{structagora_1_1media_1_1_i_audio_frame_observer_base_1_1_audio_params_a5472c413e05754679e256cbc17312be1}} 
\index{agora::media::IAudioFrameObserverBase::AudioParams@{agora::media::IAudioFrameObserverBase::AudioParams}!samples\_per\_call@{samples\_per\_call}}
\index{samples\_per\_call@{samples\_per\_call}!agora::media::IAudioFrameObserverBase::AudioParams@{agora::media::IAudioFrameObserverBase::AudioParams}}
\doxysubsubsection{\texorpdfstring{samples\_per\_call}{samples\_per\_call}}
{\footnotesize\ttfamily int agora\+::media\+::\+I\+Audio\+Frame\+Observer\+Base\+::\+Audio\+Params\+::samples\+\_\+per\+\_\+call}

The number of samples, such as 1024 for the media push. 