Agora Java API Reference for Android
Public Member Functions | List of all members
agora::rtc::IAudioEncodedFrameObserver Class Referenceabstract

#include <AgoraBase.h>

Public Member Functions

virtual void onRecordAudioEncodedFrame (const uint8_t *frameBuffer, int length, const EncodedAudioFrameInfo &audioEncodedFrameInfo)=0
 Gets the encoded audio data of the local user. More...
 
virtual void onPlaybackAudioEncodedFrame (const uint8_t *frameBuffer, int length, const EncodedAudioFrameInfo &audioEncodedFrameInfo)=0
 Gets the encoded audio data of all remote users. More...
 
virtual void onMixedAudioEncodedFrame (const uint8_t *frameBuffer, int length, const EncodedAudioFrameInfo &audioEncodedFrameInfo)=0
 Gets the mixed and encoded audio data of the local and all remote users. More...
 

Detailed Description

The encoded audio observer.

Member Function Documentation

◆ onRecordAudioEncodedFrame()

virtual void agora::rtc::IAudioEncodedFrameObserver::onRecordAudioEncodedFrame ( const uint8_t *  frameBuffer,
int  length,
const EncodedAudioFrameInfo audioEncodedFrameInfo 
)
pure virtual

Gets the encoded audio data of the local user.

After calling registerAudioEncodedFrameObserver and setting the encoded audio as AUDIO_ENCODED_FRAME_OBSERVER_POSITION_RECORD, you can get the encoded audio data of the local user from this callback.

Parameters
frameBufferThe audio buffer.
lengthThe data length (byte).
audioEncodedFrameInfoAudio information after encoding. See EncodedAudioFrameInfo.

◆ onPlaybackAudioEncodedFrame()

virtual void agora::rtc::IAudioEncodedFrameObserver::onPlaybackAudioEncodedFrame ( const uint8_t *  frameBuffer,
int  length,
const EncodedAudioFrameInfo audioEncodedFrameInfo 
)
pure virtual

Gets the encoded audio data of all remote users.

After calling registerAudioEncodedFrameObserver and setting the encoded audio as AUDIO_ENCODED_FRAME_OBSERVER_POSITION_PLAYBACK, you can get encoded audio data of all remote users through this callback.

Parameters
frameBufferThe audio buffer.
lengthThe data length (byte).
audioEncodedFrameInfoAudio information after encoding. See EncodedAudioFrameInfo.

◆ onMixedAudioEncodedFrame()

virtual void agora::rtc::IAudioEncodedFrameObserver::onMixedAudioEncodedFrame ( const uint8_t *  frameBuffer,
int  length,
const EncodedAudioFrameInfo audioEncodedFrameInfo 
)
pure virtual

Gets the mixed and encoded audio data of the local and all remote users.

After calling registerAudioEncodedFrameObserver and setting the audio profile as AUDIO_ENCODED_FRAME_OBSERVER_POSITION_MIXED, you can get the mixed and encoded audio data of the local and all remote users through this callback.

Parameters
frameBufferThe audio buffer.
lengthThe data length (byte).
audioEncodedFrameInfoAudio information after encoding. See EncodedAudioFrameInfo.