Agora RTC Objective-C API Reference  Refactor
Public Member Functions
IAudioEncodedFrameObserver Class Referenceabstract

Public Member Functions

virtual void OnRecordAudioEncodedFrame (const uint8_t *frameBuffer, int length, const EncodedAudioFrameInfo &audioEncodedFrameInfo)=0
 
virtual void OnPlaybackAudioEncodedFrame (const uint8_t *frameBuffer, int length, const EncodedAudioFrameInfo &audioEncodedFrameInfo)=0
 
virtual void OnMixedAudioEncodedFrame (const uint8_t *frameBuffer, int length, const EncodedAudioFrameInfo &audioEncodedFrameInfo)=0
 

Detailed Description

The encoded audio observer.

Constructor & Destructor Documentation

◆ ~IAudioEncodedFrameObserver()

virtual ~IAudioEncodedFrameObserver ( )
inlinevirtual

Member Function Documentation

◆ OnRecordAudioEncodedFrame()

virtual void 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 pointer to the audio frame buffer.
lengthThe data length (byte) of the audio frame.
audioEncodedFrameInfoAudio information after encoding. For details, see EncodedAudioFrameInfo.

◆ OnPlaybackAudioEncodedFrame()

virtual void 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 pointer to the audio frame buffer.
lengthThe data length (byte) of the audio frame.
audioEncodedFrameInfoAudio information after encoding. For details, see EncodedAudioFrameInfo.

◆ OnMixedAudioEncodedFrame()

virtual void 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 pointer to the audio frame buffer.
lengthThe data length (byte) of the audio frame.
audioEncodedFrameInfoAudio information after encoding. For details, see EncodedAudioFrameInfo.