\hypertarget{classio_1_1agora_1_1base_1_1_audio_frame}{}\doxysection{io.\+agora.\+base.\+Audio\+Frame Class Reference}
\label{classio_1_1agora_1_1base_1_1_audio_frame}\index{io.agora.base.AudioFrame@{io.agora.base.AudioFrame}}


Raw audio data.  


\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classio_1_1agora_1_1base_1_1_audio_frame_a1863d159fbd0f8c5c8bf0b654556f0a1}\label{classio_1_1agora_1_1base_1_1_audio_frame_a1863d159fbd0f8c5c8bf0b654556f0a1}} 
{\bfseries Audio\+Frame} (Byte\+Buffer \mbox{\hyperlink{classio_1_1agora_1_1base_1_1_audio_frame_a099aa058827ca54719b906c10893c098}{buffer}}, int \mbox{\hyperlink{classio_1_1agora_1_1base_1_1_audio_frame_a483e9491b15f4a6c11b906b333e8511b}{sample\+Rata\+Hz}}, int \mbox{\hyperlink{classio_1_1agora_1_1base_1_1_audio_frame_a795d1c0fa7f65288bcac076d8dc1a9cb}{bytes\+Per\+Sample}}, int \mbox{\hyperlink{classio_1_1agora_1_1base_1_1_audio_frame_a40b99b0c125e75d2b4deeed0583823a8}{channel\+Nums}}, int \mbox{\hyperlink{classio_1_1agora_1_1base_1_1_audio_frame_a857a22faa51eab629027730d76dc3399}{samples\+Per\+Channel}}, long \mbox{\hyperlink{classio_1_1agora_1_1base_1_1_audio_frame_ab547983777dcd5d840a9b42658d19aa2}{timestamp}})
\item 
\mbox{\Hypertarget{classio_1_1agora_1_1base_1_1_audio_frame_a507b7913b28ca66d64f8222277698178}\label{classio_1_1agora_1_1base_1_1_audio_frame_a507b7913b28ca66d64f8222277698178}} 
Byte\+Buffer {\bfseries get\+Byte\+Buffer} ()
\item 
\mbox{\Hypertarget{classio_1_1agora_1_1base_1_1_audio_frame_a35c0770c34b92e1e4e1c8114915d925b}\label{classio_1_1agora_1_1base_1_1_audio_frame_a35c0770c34b92e1e4e1c8114915d925b}} 
int {\bfseries get\+Bytes\+Per\+Sample} ()
\item 
\mbox{\Hypertarget{classio_1_1agora_1_1base_1_1_audio_frame_aaffc263943e16552d869e019fd13b6cc}\label{classio_1_1agora_1_1base_1_1_audio_frame_aaffc263943e16552d869e019fd13b6cc}} 
int {\bfseries get\+Channel\+Nums} ()
\item 
\mbox{\Hypertarget{classio_1_1agora_1_1base_1_1_audio_frame_a2db775cf2cab718714db758dbd3a777a}\label{classio_1_1agora_1_1base_1_1_audio_frame_a2db775cf2cab718714db758dbd3a777a}} 
int {\bfseries get\+Sample\+Rata\+Hz} ()
\item 
\mbox{\Hypertarget{classio_1_1agora_1_1base_1_1_audio_frame_a61136a27616464f6acead8724f59ded5}\label{classio_1_1agora_1_1base_1_1_audio_frame_a61136a27616464f6acead8724f59ded5}} 
int {\bfseries get\+Samples\+Per\+Channel} ()
\item 
\mbox{\Hypertarget{classio_1_1agora_1_1base_1_1_audio_frame_aad8a6ee9b7f6eb1fd6d5377d58b2e63a}\label{classio_1_1agora_1_1base_1_1_audio_frame_aad8a6ee9b7f6eb1fd6d5377d58b2e63a}} 
long {\bfseries get\+Timestamp} ()
\item 
\mbox{\Hypertarget{classio_1_1agora_1_1base_1_1_audio_frame_a46deafd043c65f3d349fefd97342f47d}\label{classio_1_1agora_1_1base_1_1_audio_frame_a46deafd043c65f3d349fefd97342f47d}} 
String {\bfseries to\+String} ()
\end{DoxyCompactItemize}
\doxysubsection*{Public Attributes}
\begin{DoxyCompactItemize}
\item 
Byte\+Buffer \mbox{\hyperlink{classio_1_1agora_1_1base_1_1_audio_frame_a099aa058827ca54719b906c10893c098}{buffer}}
\item 
int \mbox{\hyperlink{classio_1_1agora_1_1base_1_1_audio_frame_a483e9491b15f4a6c11b906b333e8511b}{sample\+Rata\+Hz}}
\item 
int \mbox{\hyperlink{classio_1_1agora_1_1base_1_1_audio_frame_a795d1c0fa7f65288bcac076d8dc1a9cb}{bytes\+Per\+Sample}}
\item 
int \mbox{\hyperlink{classio_1_1agora_1_1base_1_1_audio_frame_a40b99b0c125e75d2b4deeed0583823a8}{channel\+Nums}}
\item 
int \mbox{\hyperlink{classio_1_1agora_1_1base_1_1_audio_frame_a857a22faa51eab629027730d76dc3399}{samples\+Per\+Channel}}
\item 
long \mbox{\hyperlink{classio_1_1agora_1_1base_1_1_audio_frame_ab547983777dcd5d840a9b42658d19aa2}{timestamp}}
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Raw audio data. 

\doxysubsection{Member Data Documentation}
\mbox{\Hypertarget{classio_1_1agora_1_1base_1_1_audio_frame_a099aa058827ca54719b906c10893c098}\label{classio_1_1agora_1_1base_1_1_audio_frame_a099aa058827ca54719b906c10893c098}} 
\index{io.agora.base.AudioFrame@{io.agora.base.AudioFrame}!buffer@{buffer}}
\index{buffer@{buffer}!io.agora.base.AudioFrame@{io.agora.base.AudioFrame}}
\doxysubsubsection{\texorpdfstring{buffer}{buffer}}
{\footnotesize\ttfamily Byte\+Buffer io.\+agora.\+base.\+Audio\+Frame.\+buffer}

The data buffer of the audio frame. When the audio frame uses a stereo channel, the data buffer is interleaved. The size of the data buffer is as follows\+: {\ttfamily buffer} = {\ttfamily samples} × {\ttfamily channels} × {\ttfamily bytes\+Per\+Sample}. \mbox{\Hypertarget{classio_1_1agora_1_1base_1_1_audio_frame_a483e9491b15f4a6c11b906b333e8511b}\label{classio_1_1agora_1_1base_1_1_audio_frame_a483e9491b15f4a6c11b906b333e8511b}} 
\index{io.agora.base.AudioFrame@{io.agora.base.AudioFrame}!sampleRataHz@{sampleRataHz}}
\index{sampleRataHz@{sampleRataHz}!io.agora.base.AudioFrame@{io.agora.base.AudioFrame}}
\doxysubsubsection{\texorpdfstring{sampleRataHz}{sampleRataHz}}
{\footnotesize\ttfamily int io.\+agora.\+base.\+Audio\+Frame.\+sample\+Rata\+Hz}

The number of samples per channel in the audio frame. \mbox{\Hypertarget{classio_1_1agora_1_1base_1_1_audio_frame_a795d1c0fa7f65288bcac076d8dc1a9cb}\label{classio_1_1agora_1_1base_1_1_audio_frame_a795d1c0fa7f65288bcac076d8dc1a9cb}} 
\index{io.agora.base.AudioFrame@{io.agora.base.AudioFrame}!bytesPerSample@{bytesPerSample}}
\index{bytesPerSample@{bytesPerSample}!io.agora.base.AudioFrame@{io.agora.base.AudioFrame}}
\doxysubsubsection{\texorpdfstring{bytesPerSample}{bytesPerSample}}
{\footnotesize\ttfamily int io.\+agora.\+base.\+Audio\+Frame.\+bytes\+Per\+Sample}

The number of bytes per sample. For P\+CM, this parameter is generally set to 16 bits (2 bytes). \mbox{\Hypertarget{classio_1_1agora_1_1base_1_1_audio_frame_a40b99b0c125e75d2b4deeed0583823a8}\label{classio_1_1agora_1_1base_1_1_audio_frame_a40b99b0c125e75d2b4deeed0583823a8}} 
\index{io.agora.base.AudioFrame@{io.agora.base.AudioFrame}!channelNums@{channelNums}}
\index{channelNums@{channelNums}!io.agora.base.AudioFrame@{io.agora.base.AudioFrame}}
\doxysubsubsection{\texorpdfstring{channelNums}{channelNums}}
{\footnotesize\ttfamily int io.\+agora.\+base.\+Audio\+Frame.\+channel\+Nums}

The number of audio channels (the data are interleaved if it is stereo).
\begin{DoxyItemize}
\item 1\+: Mono.
\item 2\+: Stereo. 
\end{DoxyItemize}\mbox{\Hypertarget{classio_1_1agora_1_1base_1_1_audio_frame_a857a22faa51eab629027730d76dc3399}\label{classio_1_1agora_1_1base_1_1_audio_frame_a857a22faa51eab629027730d76dc3399}} 
\index{io.agora.base.AudioFrame@{io.agora.base.AudioFrame}!samplesPerChannel@{samplesPerChannel}}
\index{samplesPerChannel@{samplesPerChannel}!io.agora.base.AudioFrame@{io.agora.base.AudioFrame}}
\doxysubsubsection{\texorpdfstring{samplesPerChannel}{samplesPerChannel}}
{\footnotesize\ttfamily int io.\+agora.\+base.\+Audio\+Frame.\+samples\+Per\+Channel}

The number of samples per channel in the audio frame. \mbox{\Hypertarget{classio_1_1agora_1_1base_1_1_audio_frame_ab547983777dcd5d840a9b42658d19aa2}\label{classio_1_1agora_1_1base_1_1_audio_frame_ab547983777dcd5d840a9b42658d19aa2}} 
\index{io.agora.base.AudioFrame@{io.agora.base.AudioFrame}!timestamp@{timestamp}}
\index{timestamp@{timestamp}!io.agora.base.AudioFrame@{io.agora.base.AudioFrame}}
\doxysubsubsection{\texorpdfstring{timestamp}{timestamp}}
{\footnotesize\ttfamily long io.\+agora.\+base.\+Audio\+Frame.\+timestamp}

The timestamp (ms) of the audio frame. 