\hypertarget{interfaceio_1_1agora_1_1rtc2_1_1_i_audio_frame_observer}{}\doxysection{io.\+agora.\+rtc2.\+I\+Audio\+Frame\+Observer Interface Reference}
\label{interfaceio_1_1agora_1_1rtc2_1_1_i_audio_frame_observer}\index{io.agora.rtc2.IAudioFrameObserver@{io.agora.rtc2.IAudioFrameObserver}}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
abstract boolean \mbox{\hyperlink{interfaceio_1_1agora_1_1rtc2_1_1_i_audio_frame_observer_a1ee188710b22855bd828a9449fd838d4}{on\+Record\+Audio\+Frame}} (String channel\+Id, int type, int samples\+Per\+Channel, int bytes\+Per\+Sample, int channels, int samples\+Per\+Sec, Byte\+Buffer buffer, long render\+Time\+Ms, int avsync\+\_\+type)
\begin{DoxyCompactList}\small\item\em Gets the captured audio frame. \end{DoxyCompactList}\item 
abstract boolean \mbox{\hyperlink{interfaceio_1_1agora_1_1rtc2_1_1_i_audio_frame_observer_ab35053c29e69caef0ebd833fac21784f}{on\+Playback\+Audio\+Frame}} (String channel\+Id, int type, int samples\+Per\+Channel, int bytes\+Per\+Sample, int channels, int samples\+Per\+Sec, Byte\+Buffer buffer, long render\+Time\+Ms, int avsync\+\_\+type)
\begin{DoxyCompactList}\small\item\em Gets the raw audio frame for playback. \end{DoxyCompactList}\item 
abstract boolean \mbox{\hyperlink{interfaceio_1_1agora_1_1rtc2_1_1_i_audio_frame_observer_a2bf1588c6b321f063611356f6f0b8e20}{on\+Mixed\+Audio\+Frame}} (String channel\+Id, int type, int samples\+Per\+Channel, int bytes\+Per\+Sample, int channels, int samples\+Per\+Sec, Byte\+Buffer buffer, long render\+Time\+Ms, int avsync\+\_\+type)
\begin{DoxyCompactList}\small\item\em Retrieves the mixed captured and playback audio frame. \end{DoxyCompactList}\item 
abstract boolean \mbox{\hyperlink{interfaceio_1_1agora_1_1rtc2_1_1_i_audio_frame_observer_aca30e6f2a70dbf4e84a577296450ed0a}{on\+Ear\+Monitoring\+Audio\+Frame}} (int type, int samples\+Per\+Channel, int bytes\+Per\+Sample, int channels, int samples\+Per\+Sec, Byte\+Buffer buffer, long render\+Time\+Ms, int avsync\+\_\+type)
\begin{DoxyCompactList}\small\item\em Gets the in-\/ear monitoring audio frame. \end{DoxyCompactList}\item 
abstract boolean \mbox{\hyperlink{interfaceio_1_1agora_1_1rtc2_1_1_i_audio_frame_observer_a428eb1b05c51feb2be1488d677ec8498}{on\+Playback\+Audio\+Frame\+Before\+Mixing}} (String channel\+Id, int uid, int type, int samples\+Per\+Channel, int bytes\+Per\+Sample, int channels, int samples\+Per\+Sec, Byte\+Buffer buffer, long render\+Time\+Ms, int avsync\+\_\+type, int rtp\+Timestamp, long presentation\+Ms)
\begin{DoxyCompactList}\small\item\em Retrieves the audio frame before mixing of subscribed remote users. \end{DoxyCompactList}\item 
abstract int \mbox{\hyperlink{interfaceio_1_1agora_1_1rtc2_1_1_i_audio_frame_observer_a8fefe6e674b4d77226693e569036e6ef}{get\+Observed\+Audio\+Frame\+Position}} ()
\begin{DoxyCompactList}\small\item\em Sets the frame position for the video observer. \end{DoxyCompactList}\item 
abstract \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1audio_1_1_audio_params}{Audio\+Params}} \mbox{\hyperlink{interfaceio_1_1agora_1_1rtc2_1_1_i_audio_frame_observer_a9e62f7b9c5cf201cd75ea2f0b2417b43}{get\+Record\+Audio\+Params}} ()
\begin{DoxyCompactList}\small\item\em Sets the audio format for the {\ttfamily on\+Record\+Audio\+Frame} callback. \end{DoxyCompactList}\item 
abstract \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1audio_1_1_audio_params}{Audio\+Params}} \mbox{\hyperlink{interfaceio_1_1agora_1_1rtc2_1_1_i_audio_frame_observer_ae9850f39cd04cee8419eb469e9318b8f}{get\+Playback\+Audio\+Params}} ()
\begin{DoxyCompactList}\small\item\em Sets the audio format for the {\ttfamily on\+Playback\+Audio\+Frame} callback. \end{DoxyCompactList}\item 
abstract \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1audio_1_1_audio_params}{Audio\+Params}} \mbox{\hyperlink{interfaceio_1_1agora_1_1rtc2_1_1_i_audio_frame_observer_a5fa3838fcba7216a10777e86503f6646}{get\+Mixed\+Audio\+Params}} ()
\begin{DoxyCompactList}\small\item\em Sets the audio format for the {\ttfamily on\+Mixed\+Audio\+Frame} callback. \end{DoxyCompactList}\item 
abstract \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1audio_1_1_audio_params}{Audio\+Params}} \mbox{\hyperlink{interfaceio_1_1agora_1_1rtc2_1_1_i_audio_frame_observer_ad2dfd3f50aff650e92d74d48c761245c}{get\+Ear\+Monitoring\+Audio\+Params}} ()
\begin{DoxyCompactList}\small\item\em Sets the audio format for the {\ttfamily on\+Ear\+Monitoring\+Audio\+Frame} callback. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
The \mbox{\hyperlink{interfaceio_1_1agora_1_1rtc2_1_1_i_audio_frame_observer}{I\+Audio\+Frame\+Observer}} interface. 

\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{interfaceio_1_1agora_1_1rtc2_1_1_i_audio_frame_observer_a1ee188710b22855bd828a9449fd838d4}\label{interfaceio_1_1agora_1_1rtc2_1_1_i_audio_frame_observer_a1ee188710b22855bd828a9449fd838d4}} 
\index{io.agora.rtc2.IAudioFrameObserver@{io.agora.rtc2.IAudioFrameObserver}!onRecordAudioFrame@{onRecordAudioFrame}}
\index{onRecordAudioFrame@{onRecordAudioFrame}!io.agora.rtc2.IAudioFrameObserver@{io.agora.rtc2.IAudioFrameObserver}}
\doxysubsubsection{\texorpdfstring{onRecordAudioFrame()}{onRecordAudioFrame()}}
{\footnotesize\ttfamily abstract boolean io.\+agora.\+rtc2.\+I\+Audio\+Frame\+Observer.\+on\+Record\+Audio\+Frame (\begin{DoxyParamCaption}\item[{String}]{channel\+Id,  }\item[{int}]{type,  }\item[{int}]{samples\+Per\+Channel,  }\item[{int}]{bytes\+Per\+Sample,  }\item[{int}]{channels,  }\item[{int}]{samples\+Per\+Sec,  }\item[{Byte\+Buffer}]{buffer,  }\item[{long}]{render\+Time\+Ms,  }\item[{int}]{avsync\+\_\+type }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [abstract]}}



Gets the captured audio frame. 

To ensure that the format of the cpatured audio frame is as expected, you can choose one of the following two methods to set the audio data format\+:
\begin{DoxyItemize}
\item Method 1\+: After calling {\ttfamily set\+Recording\+Audio\+Frame\+Parameters} to set the audio data format and {\ttfamily register\+Audio\+Frame\+Observer} to register the audio frame observer object, the S\+DK calculates the sampling interval according to the parameters set in the methods, and triggers the {\ttfamily on\+Record\+Audio\+Frame} callback according to the sampling interval.
\item Method 2\+: After calling {\ttfamily register\+Audio\+Frame\+Observer} to register the audio frame observer object, set the audio data format in the return value of the {\ttfamily get\+Observed\+Audio\+Frame\+Position} callback. The S\+DK then calculates the sampling interval according to the return value of the {\ttfamily get\+Record\+Audio\+Params} callback, and triggers the {\ttfamily on\+Record\+Audio\+Frame} callback according to the sampling interval.
\end{DoxyItemize}

\begin{DoxyNote}{Note}
The priority of method 1 is higher than that of method 2. If method 1 is used to set the audio data format, the setting of method 2 is invalid.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em channel\+Id} & The channel ID. \\
\hline
{\em type} & The audio frame type. \\
\hline
{\em samples\+Per\+Channel} & The number of samples per channel in the audio frame. \\
\hline
{\em bytes\+Per\+Sample} & The number of bytes per audio sample. For example, each P\+CM audio sample usually takes up 16 bits (2 bytes). \\
\hline
{\em channels} & The number of channels.
\begin{DoxyItemize}
\item 1\+: Mono.
\item 2\+: Stereo. If the channel uses stereo, the data is interleaved. 
\end{DoxyItemize}\\
\hline
{\em samples\+Per\+Sec} & Recording sample rate (Hz). \\
\hline
{\em buffer} & The audio buffer. The buffer size = samples\+Per\+Channel x channels x bytes\+Per\+Sample. \\
\hline
{\em render\+Time\+Ms} & The timestamp (ms) of the external audio frame. You can use this parameter for the following purpose\+: Synchronize audio and video frames in video or audio related scenarios, including where external video sources are used. \\
\hline
{\em avsync\+\_\+type} & Reserved for future use.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Without practical meaning. 
\end{DoxyReturn}
\mbox{\Hypertarget{interfaceio_1_1agora_1_1rtc2_1_1_i_audio_frame_observer_ab35053c29e69caef0ebd833fac21784f}\label{interfaceio_1_1agora_1_1rtc2_1_1_i_audio_frame_observer_ab35053c29e69caef0ebd833fac21784f}} 
\index{io.agora.rtc2.IAudioFrameObserver@{io.agora.rtc2.IAudioFrameObserver}!onPlaybackAudioFrame@{onPlaybackAudioFrame}}
\index{onPlaybackAudioFrame@{onPlaybackAudioFrame}!io.agora.rtc2.IAudioFrameObserver@{io.agora.rtc2.IAudioFrameObserver}}
\doxysubsubsection{\texorpdfstring{onPlaybackAudioFrame()}{onPlaybackAudioFrame()}}
{\footnotesize\ttfamily abstract boolean io.\+agora.\+rtc2.\+I\+Audio\+Frame\+Observer.\+on\+Playback\+Audio\+Frame (\begin{DoxyParamCaption}\item[{String}]{channel\+Id,  }\item[{int}]{type,  }\item[{int}]{samples\+Per\+Channel,  }\item[{int}]{bytes\+Per\+Sample,  }\item[{int}]{channels,  }\item[{int}]{samples\+Per\+Sec,  }\item[{Byte\+Buffer}]{buffer,  }\item[{long}]{render\+Time\+Ms,  }\item[{int}]{avsync\+\_\+type }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [abstract]}}



Gets the raw audio frame for playback. 

To ensure that the format of the cpatured audio frame is as expected, you can choose one of the following two methods to set the audio data format\+:
\begin{DoxyItemize}
\item Method 1\+: After calling {\ttfamily set\+Playback\+Audio\+Frame\+Parameters} to set the audio data format and {\ttfamily register\+Audio\+Frame\+Observer} to register the audio frame observer object, the S\+DK calculates the sampling interval according to the parameters set in the methods, and triggers the {\ttfamily on\+Playback\+Audio\+Frame} callback according to the sampling interval.
\item Method 2\+: After calling {\ttfamily register\+Audio\+Frame\+Observer} to register the audio frame observer object, set the audio data format in the return value of the {\ttfamily get\+Observed\+Audio\+Frame\+Position} callback. The S\+DK then calculates the sampling interval according to the return value of the {\ttfamily get\+Playback\+Audio\+Params} callback, and triggers the {\ttfamily on\+Playback\+Audio\+Frame} callback according to the sampling interval.
\end{DoxyItemize}

\begin{DoxyNote}{Note}
The priority of method 1 is higher than that of method 2. If method 1 is used to set the audio data format, the setting of method 2 is invalid.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em channel\+Id} & The channel ID. \\
\hline
{\em type} & The audio frame type. \\
\hline
{\em samples\+Per\+Channel} & The number of samples per channel in the audio frame. \\
\hline
{\em bytes\+Per\+Sample} & The number of bytes per audio sample. For example, each P\+CM audio sample usually takes up 16 bits (2 bytes). \\
\hline
{\em channels} & The number of channels.
\begin{DoxyItemize}
\item 1\+: Mono.
\item 2\+: Stereo. If the channel uses stereo, the data is interleaved. 
\end{DoxyItemize}\\
\hline
{\em samples\+Per\+Sec} & Recording sample rate (Hz). \\
\hline
{\em buffer} & The audio buffer. The buffer size = samples\+Per\+Channel x channels x bytes\+Per\+Sample. \\
\hline
{\em render\+Time\+Ms} & The timestamp (ms) of the external audio frame. You can use this parameter for the following purpose\+: Synchronize audio and video frames in video or audio related scenarios, including where external video sources are used. \\
\hline
{\em avsync\+\_\+type} & Reserved for future use.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Without practical meaning. 
\end{DoxyReturn}
\mbox{\Hypertarget{interfaceio_1_1agora_1_1rtc2_1_1_i_audio_frame_observer_a2bf1588c6b321f063611356f6f0b8e20}\label{interfaceio_1_1agora_1_1rtc2_1_1_i_audio_frame_observer_a2bf1588c6b321f063611356f6f0b8e20}} 
\index{io.agora.rtc2.IAudioFrameObserver@{io.agora.rtc2.IAudioFrameObserver}!onMixedAudioFrame@{onMixedAudioFrame}}
\index{onMixedAudioFrame@{onMixedAudioFrame}!io.agora.rtc2.IAudioFrameObserver@{io.agora.rtc2.IAudioFrameObserver}}
\doxysubsubsection{\texorpdfstring{onMixedAudioFrame()}{onMixedAudioFrame()}}
{\footnotesize\ttfamily abstract boolean io.\+agora.\+rtc2.\+I\+Audio\+Frame\+Observer.\+on\+Mixed\+Audio\+Frame (\begin{DoxyParamCaption}\item[{String}]{channel\+Id,  }\item[{int}]{type,  }\item[{int}]{samples\+Per\+Channel,  }\item[{int}]{bytes\+Per\+Sample,  }\item[{int}]{channels,  }\item[{int}]{samples\+Per\+Sec,  }\item[{Byte\+Buffer}]{buffer,  }\item[{long}]{render\+Time\+Ms,  }\item[{int}]{avsync\+\_\+type }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [abstract]}}



Retrieves the mixed captured and playback audio frame. 

To ensure that the data format of mixed captured and playback audio frame meets the expectations, Agora recommends that you choose one of the following two ways to set the data format\+:
\begin{DoxyItemize}
\item Method 1\+: After calling {\ttfamily set\+Mixed\+Audio\+Frame\+Parameters} to set the audio data format and {\ttfamily register\+Audio\+Frame\+Observer} to register the audio frame observer object, the S\+DK calculates the sampling interval according to the parameters set in the methods, and triggers the {\ttfamily on\+Mixed\+Audio\+Frame} callback according to the sampling interval.
\item Method 2\+: After calling {\ttfamily register\+Audio\+Frame\+Observer} to register the audio frame observer object, set the audio data format in the return value of the {\ttfamily get\+Observed\+Audio\+Frame\+Position} callback. The S\+DK then calculates the sampling interval according to the return value of the {\ttfamily get\+Mixed\+Audio\+Params} callback, and triggers the {\ttfamily on\+Mixed\+Audio\+Frame} callback according to the sampling interval.
\end{DoxyItemize}

\begin{DoxyNote}{Note}
The priority of method 1 is higher than that of method 2. If method 1 is used to set the audio data format, the setting of method 2 is invalid.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em type} & The audio frame type. \\
\hline
{\em samples\+Per\+Channel} & The number of samples per channel in the audio frame. \\
\hline
{\em bytes\+Per\+Sample} & The number of bytes per audio sample. For example, each P\+CM audio sample usually takes up 16 bits (2 bytes). \\
\hline
{\em channels} & The number of channels.
\begin{DoxyItemize}
\item 1\+: Mono.
\item 2\+: Stereo. If the channel uses stereo, the data is interleaved. 
\end{DoxyItemize}\\
\hline
{\em samples\+Per\+Sec} & Recording sample rate (Hz). \\
\hline
{\em buffer} & The audio buffer. The buffer size = samples\+Per\+Channel x channels x bytes\+Per\+Sample. \\
\hline
{\em render\+Time\+Ms} & The timestamp (ms) of the external audio frame. You can use this parameter for the following purpose\+: Synchronize audio and video frames in video or audio related scenarios, including where external video sources are used. \\
\hline
{\em avsync\+\_\+type} & Reserved for future use.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Without practical meaning. 
\end{DoxyReturn}
\mbox{\Hypertarget{interfaceio_1_1agora_1_1rtc2_1_1_i_audio_frame_observer_aca30e6f2a70dbf4e84a577296450ed0a}\label{interfaceio_1_1agora_1_1rtc2_1_1_i_audio_frame_observer_aca30e6f2a70dbf4e84a577296450ed0a}} 
\index{io.agora.rtc2.IAudioFrameObserver@{io.agora.rtc2.IAudioFrameObserver}!onEarMonitoringAudioFrame@{onEarMonitoringAudioFrame}}
\index{onEarMonitoringAudioFrame@{onEarMonitoringAudioFrame}!io.agora.rtc2.IAudioFrameObserver@{io.agora.rtc2.IAudioFrameObserver}}
\doxysubsubsection{\texorpdfstring{onEarMonitoringAudioFrame()}{onEarMonitoringAudioFrame()}}
{\footnotesize\ttfamily abstract boolean io.\+agora.\+rtc2.\+I\+Audio\+Frame\+Observer.\+on\+Ear\+Monitoring\+Audio\+Frame (\begin{DoxyParamCaption}\item[{int}]{type,  }\item[{int}]{samples\+Per\+Channel,  }\item[{int}]{bytes\+Per\+Sample,  }\item[{int}]{channels,  }\item[{int}]{samples\+Per\+Sec,  }\item[{Byte\+Buffer}]{buffer,  }\item[{long}]{render\+Time\+Ms,  }\item[{int}]{avsync\+\_\+type }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [abstract]}}



Gets the in-\/ear monitoring audio frame. 

To ensure that the obtained in-\/ear audio data meets the expectations, Agora recommends that you choose one of the following two methods to set the audio data format\+:
\begin{DoxyItemize}
\item Method 1\+: After calling {\ttfamily set\+Ear\+Monitoring\+Audio\+Frame\+Parameters} to set the audio data format and {\ttfamily register\+Audio\+Frame\+Observer} to register the audio frame observer object, the S\+DK calculates the sampling interval according to the parameters set in the methods, and triggers the {\ttfamily on\+Ear\+Monitoring\+Audio\+Frame} callback according to the sampling interval.
\item Method 2\+: After calling {\ttfamily register\+Audio\+Frame\+Observer} to register the audio frame observer object, set the audio data format in the return value of the {\ttfamily get\+Observed\+Audio\+Frame\+Position} callback. The S\+DK then calculates the sampling interval according to the return value of the {\ttfamily get\+Ear\+Monitoring\+Audio\+Params} callback, and triggers the {\ttfamily on\+Ear\+Monitoring\+Audio\+Frame} callback according to the sampling interval.
\end{DoxyItemize}

\begin{DoxyNote}{Note}
The priority of method 1 is higher than that of method 2. If method 1 is used to set the audio data format, the setting of method 2 is invalid.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em type} & The audio frame type. \\
\hline
{\em samples\+Per\+Channel} & The number of samples per channel in the audio frame. \\
\hline
{\em bytes\+Per\+Sample} & The number of bytes per audio sample. For example, each P\+CM audio sample usually takes up 16 bits (2 bytes). \\
\hline
{\em channels} & The number of channels.
\begin{DoxyItemize}
\item 1\+: Mono.
\item 2\+: Stereo. If the channel uses stereo, the data is interleaved. 
\end{DoxyItemize}\\
\hline
{\em samples\+Per\+Sec} & Recording sample rate (Hz). \\
\hline
{\em buffer} & The audio buffer. The buffer size = samples\+Per\+Channel x channels x bytes\+Per\+Sample. \\
\hline
{\em render\+Time\+Ms} & The timestamp (ms) of the external audio frame. You can use this parameter for the following purpose\+: Synchronize audio and video frames in video or audio related scenarios, including where external video sources are used. \\
\hline
{\em avsync\+\_\+type} & Reserved for future use.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Without practical meaning. 
\end{DoxyReturn}
\mbox{\Hypertarget{interfaceio_1_1agora_1_1rtc2_1_1_i_audio_frame_observer_a428eb1b05c51feb2be1488d677ec8498}\label{interfaceio_1_1agora_1_1rtc2_1_1_i_audio_frame_observer_a428eb1b05c51feb2be1488d677ec8498}} 
\index{io.agora.rtc2.IAudioFrameObserver@{io.agora.rtc2.IAudioFrameObserver}!onPlaybackAudioFrameBeforeMixing@{onPlaybackAudioFrameBeforeMixing}}
\index{onPlaybackAudioFrameBeforeMixing@{onPlaybackAudioFrameBeforeMixing}!io.agora.rtc2.IAudioFrameObserver@{io.agora.rtc2.IAudioFrameObserver}}
\doxysubsubsection{\texorpdfstring{onPlaybackAudioFrameBeforeMixing()}{onPlaybackAudioFrameBeforeMixing()}}
{\footnotesize\ttfamily abstract boolean io.\+agora.\+rtc2.\+I\+Audio\+Frame\+Observer.\+on\+Playback\+Audio\+Frame\+Before\+Mixing (\begin{DoxyParamCaption}\item[{String}]{channel\+Id,  }\item[{int}]{uid,  }\item[{int}]{type,  }\item[{int}]{samples\+Per\+Channel,  }\item[{int}]{bytes\+Per\+Sample,  }\item[{int}]{channels,  }\item[{int}]{samples\+Per\+Sec,  }\item[{Byte\+Buffer}]{buffer,  }\item[{long}]{render\+Time\+Ms,  }\item[{int}]{avsync\+\_\+type,  }\item[{int}]{rtp\+Timestamp,  }\item[{long}]{presentation\+Ms }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [abstract]}}



Retrieves the audio frame before mixing of subscribed remote users. 


\begin{DoxyParams}{Parameters}
{\em uid} & The ID of subscribed remote users. \\
\hline
{\em type} & The audio frame type. \\
\hline
{\em samples\+Per\+Channel} & The number of samples per channel in the audio frame. \\
\hline
{\em bytes\+Per\+Sample} & The number of bytes per audio sample. For example, each P\+CM audio sample usually takes up 16 bits (2 bytes). \\
\hline
{\em channels} & The number of channels.
\begin{DoxyItemize}
\item 1\+: Mono.
\item 2\+: Stereo. If the channel uses stereo, the data is interleaved. 
\end{DoxyItemize}\\
\hline
{\em samples\+Per\+Sec} & Recording sample rate (Hz). \\
\hline
{\em buffer} & The audio buffer. The buffer size = samples\+Per\+Channel x channels x bytes\+Per\+Sample. \\
\hline
{\em render\+Time\+Ms} & The timestamp (ms) of the external audio frame. You can use this parameter for the following purpose\+: Synchronize audio and video frames in video or audio related scenarios, including where external video sources are used. \\
\hline
{\em avsync\+\_\+type} & Reserved for future use.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Without practical meaning. 
\end{DoxyReturn}
\mbox{\Hypertarget{interfaceio_1_1agora_1_1rtc2_1_1_i_audio_frame_observer_a8fefe6e674b4d77226693e569036e6ef}\label{interfaceio_1_1agora_1_1rtc2_1_1_i_audio_frame_observer_a8fefe6e674b4d77226693e569036e6ef}} 
\index{io.agora.rtc2.IAudioFrameObserver@{io.agora.rtc2.IAudioFrameObserver}!getObservedAudioFramePosition@{getObservedAudioFramePosition}}
\index{getObservedAudioFramePosition@{getObservedAudioFramePosition}!io.agora.rtc2.IAudioFrameObserver@{io.agora.rtc2.IAudioFrameObserver}}
\doxysubsubsection{\texorpdfstring{getObservedAudioFramePosition()}{getObservedAudioFramePosition()}}
{\footnotesize\ttfamily abstract int io.\+agora.\+rtc2.\+I\+Audio\+Frame\+Observer.\+get\+Observed\+Audio\+Frame\+Position (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [abstract]}}



Sets the frame position for the video observer. 

After successfully registering the audio data observer, the S\+DK uses this callback for each specific audio frame processing node to determine whether to trigger the following callbacks\+:
\begin{DoxyItemize}
\item {\ttfamily on\+Record\+Audio\+Frame}
\item {\ttfamily on\+Playback\+Audio\+Frame}
\item {\ttfamily on\+Playback\+Audio\+Frame\+Before\+Mixing}
\item {\ttfamily on\+Mixed\+Audio\+Frame}
\item {\ttfamily on\+Ear\+Monitoring\+Audio\+Frame} You can set one or more positions you need to observe by modifying the return value of {\ttfamily get\+Observed\+Audio\+Frame\+Position} based on your scenario requirements\+: When the annotation observes multiple locations, the $\vert$ (or operator) is required. To conserve system resources, you can reduce the number of frame positions that you want to observe.
\end{DoxyItemize}

\begin{DoxyReturn}{Returns}
Returns a bitmask that sets the observation position, with the following values\+:
\begin{DoxyItemize}
\item P\+O\+S\+I\+T\+I\+O\+N\+\_\+\+P\+L\+A\+Y\+B\+A\+CK (0x0001)\+: This position can observe the playback audio mixed by all remote users, corresponding to the {\ttfamily on\+Playback\+Audio\+Frame} callback.
\item P\+O\+S\+I\+T\+I\+O\+N\+\_\+\+R\+E\+C\+O\+RD (0x0002)\+: This position can observe the collected local user\textquotesingle{}s audio, corresponding to the {\ttfamily on\+Record\+Audio\+Frame} callback.
\item P\+O\+S\+I\+T\+I\+O\+N\+\_\+\+M\+I\+X\+ED (0x0004)\+: This position can observe the playback audio mixed by the loacl user and all remote users, corresponding to the {\ttfamily on\+Mixed\+Audio\+Frame} callback.
\item P\+O\+S\+I\+T\+I\+O\+N\+\_\+\+B\+E\+F\+O\+R\+E\+\_\+\+M\+I\+X\+I\+NG (0x0008)\+: This position can observe the audio of a single remote user before mixing, corresponding to the {\ttfamily on\+Playback\+Audio\+Frame\+Before\+Mixing} callback.
\item P\+O\+S\+I\+T\+I\+O\+N\+\_\+\+E\+A\+R\+\_\+\+M\+O\+N\+I\+T\+O\+R\+I\+NG (0x0010)\+: This position can observe the in-\/ear monitoring audio of the local user, corresponding to the {\ttfamily on\+Ear\+Monitoring\+Audio\+Frame} callback. 
\end{DoxyItemize}
\end{DoxyReturn}
\mbox{\Hypertarget{interfaceio_1_1agora_1_1rtc2_1_1_i_audio_frame_observer_a9e62f7b9c5cf201cd75ea2f0b2417b43}\label{interfaceio_1_1agora_1_1rtc2_1_1_i_audio_frame_observer_a9e62f7b9c5cf201cd75ea2f0b2417b43}} 
\index{io.agora.rtc2.IAudioFrameObserver@{io.agora.rtc2.IAudioFrameObserver}!getRecordAudioParams@{getRecordAudioParams}}
\index{getRecordAudioParams@{getRecordAudioParams}!io.agora.rtc2.IAudioFrameObserver@{io.agora.rtc2.IAudioFrameObserver}}
\doxysubsubsection{\texorpdfstring{getRecordAudioParams()}{getRecordAudioParams()}}
{\footnotesize\ttfamily abstract \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1audio_1_1_audio_params}{Audio\+Params}} io.\+agora.\+rtc2.\+I\+Audio\+Frame\+Observer.\+get\+Record\+Audio\+Params (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [abstract]}}



Sets the audio format for the {\ttfamily on\+Record\+Audio\+Frame} callback. 

You need to register the callback when calling the {\ttfamily register\+Audio\+Frame\+Observer} method. After you successfully register the audio observer, the S\+DK triggers this callback, and you can set the audio format in the return value of this callback.

\begin{DoxyNote}{Note}
The S\+DK triggers the {\ttfamily on\+Record\+Audio\+Frame} callback with the {\ttfamily Audio\+Params} calculated sampling interval you set in the return value. The calculation formula is Sample interval (sec) = {\ttfamily sample\+Per\+Call} /( {\ttfamily sample\+Rate} × {\ttfamily channel} ). Ensure that the sample interval ≥ 0.\+01 (s).
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
The captured audio data, see {\ttfamily Audio\+Params}. 
\end{DoxyReturn}
\mbox{\Hypertarget{interfaceio_1_1agora_1_1rtc2_1_1_i_audio_frame_observer_ae9850f39cd04cee8419eb469e9318b8f}\label{interfaceio_1_1agora_1_1rtc2_1_1_i_audio_frame_observer_ae9850f39cd04cee8419eb469e9318b8f}} 
\index{io.agora.rtc2.IAudioFrameObserver@{io.agora.rtc2.IAudioFrameObserver}!getPlaybackAudioParams@{getPlaybackAudioParams}}
\index{getPlaybackAudioParams@{getPlaybackAudioParams}!io.agora.rtc2.IAudioFrameObserver@{io.agora.rtc2.IAudioFrameObserver}}
\doxysubsubsection{\texorpdfstring{getPlaybackAudioParams()}{getPlaybackAudioParams()}}
{\footnotesize\ttfamily abstract \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1audio_1_1_audio_params}{Audio\+Params}} io.\+agora.\+rtc2.\+I\+Audio\+Frame\+Observer.\+get\+Playback\+Audio\+Params (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [abstract]}}



Sets the audio format for the {\ttfamily on\+Playback\+Audio\+Frame} callback. 

You need to register the callback when calling the {\ttfamily register\+Audio\+Frame\+Observer} method. After you successfully register the audio observer, the S\+DK triggers this callback, and you can set the audio format in the return value of this callback.

\begin{DoxyNote}{Note}
The S\+DK triggers the {\ttfamily on\+Playback\+Audio\+Frame} callback with the {\ttfamily Audio\+Params} calculated sampling interval you set in the return value. The calculation formula is Sample interval (sec) = {\ttfamily sample\+Per\+Call} /( {\ttfamily sample\+Rate} × {\ttfamily channel} ). Ensure that the sample interval ≥ 0.\+01 (s).
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
The audio data for playback, see {\ttfamily Audio\+Params}. 
\end{DoxyReturn}
\mbox{\Hypertarget{interfaceio_1_1agora_1_1rtc2_1_1_i_audio_frame_observer_a5fa3838fcba7216a10777e86503f6646}\label{interfaceio_1_1agora_1_1rtc2_1_1_i_audio_frame_observer_a5fa3838fcba7216a10777e86503f6646}} 
\index{io.agora.rtc2.IAudioFrameObserver@{io.agora.rtc2.IAudioFrameObserver}!getMixedAudioParams@{getMixedAudioParams}}
\index{getMixedAudioParams@{getMixedAudioParams}!io.agora.rtc2.IAudioFrameObserver@{io.agora.rtc2.IAudioFrameObserver}}
\doxysubsubsection{\texorpdfstring{getMixedAudioParams()}{getMixedAudioParams()}}
{\footnotesize\ttfamily abstract \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1audio_1_1_audio_params}{Audio\+Params}} io.\+agora.\+rtc2.\+I\+Audio\+Frame\+Observer.\+get\+Mixed\+Audio\+Params (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [abstract]}}



Sets the audio format for the {\ttfamily on\+Mixed\+Audio\+Frame} callback. 

You need to register the callback when calling the {\ttfamily register\+Audio\+Frame\+Observer} method. After you successfully register the audio observer, the S\+DK triggers this callback, and you can set the audio format in the return value of this callback.

\begin{DoxyNote}{Note}
The S\+DK triggers the {\ttfamily on\+Mixed\+Audio\+Frame} callback with the {\ttfamily Audio\+Params} calculated sampling interval you set in the return value. The calculation formula is Sample interval (sec) = {\ttfamily sample\+Per\+Call} /( {\ttfamily sample\+Rate} × {\ttfamily channel} ). Ensure that the sample interval ≥ 0.\+01 (s).
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
The mixed captured and playback audio data, see {\ttfamily Audio\+Params}. 
\end{DoxyReturn}
\mbox{\Hypertarget{interfaceio_1_1agora_1_1rtc2_1_1_i_audio_frame_observer_ad2dfd3f50aff650e92d74d48c761245c}\label{interfaceio_1_1agora_1_1rtc2_1_1_i_audio_frame_observer_ad2dfd3f50aff650e92d74d48c761245c}} 
\index{io.agora.rtc2.IAudioFrameObserver@{io.agora.rtc2.IAudioFrameObserver}!getEarMonitoringAudioParams@{getEarMonitoringAudioParams}}
\index{getEarMonitoringAudioParams@{getEarMonitoringAudioParams}!io.agora.rtc2.IAudioFrameObserver@{io.agora.rtc2.IAudioFrameObserver}}
\doxysubsubsection{\texorpdfstring{getEarMonitoringAudioParams()}{getEarMonitoringAudioParams()}}
{\footnotesize\ttfamily abstract \mbox{\hyperlink{classio_1_1agora_1_1rtc2_1_1audio_1_1_audio_params}{Audio\+Params}} io.\+agora.\+rtc2.\+I\+Audio\+Frame\+Observer.\+get\+Ear\+Monitoring\+Audio\+Params (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [abstract]}}



Sets the audio format for the {\ttfamily on\+Ear\+Monitoring\+Audio\+Frame} callback. 

You need to register the callback when calling the {\ttfamily register\+Audio\+Frame\+Observer} method. After you successfully register the audio observer, the S\+DK triggers this callback, and you can set the audio format in the return value of this callback.

\begin{DoxyNote}{Note}
The S\+DK triggers the {\ttfamily on\+Ear\+Monitoring\+Audio\+Frame} callback with the {\ttfamily Audio\+Params} calculated sampling interval you set in the return value. The calculation formula is {\ttfamily Sample} interval ( {\ttfamily sec} ) = {\ttfamily sample\+Per\+Call} /( {\ttfamily sample\+Rate} × {\ttfamily channel} ). Ensure that the sample interval ≥ 0.\+01 (s).
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
The audio data of in-\/ear monitoring, see {\ttfamily Audio\+Params}. 
\end{DoxyReturn}
