Agora Java API Reference for Android
Classes | Public Types | Public Member Functions | List of all members
agora::media::IAudioFrameObserver Class Referenceabstract

#include <AgoraMediaBase.h>

Classes

struct  AudioFrame
 

Public Types

enum  AUDIO_FRAME_TYPE { FRAME_TYPE_PCM16 = 0 }
 

Public Member Functions

virtual bool onRecordAudioFrame (AudioFrame &audioFrame)=0
 
virtual bool onPlaybackAudioFrame (AudioFrame &audioFrame)=0
 
virtual bool onMixedAudioFrame (AudioFrame &audioFrame)=0
 
virtual bool onPlaybackAudioFrameBeforeMixing (unsigned int uid, AudioFrame &audioFrame)=0
 

Detailed Description

The IAudioFrameObserver class.

Member Enumeration Documentation

◆ AUDIO_FRAME_TYPE

Audio frame types.

Enumerator
FRAME_TYPE_PCM16 

0: 16-bit PCM.

Member Function Documentation

◆ onRecordAudioFrame()

virtual bool agora::media::IAudioFrameObserver::onRecordAudioFrame ( AudioFrame audioFrame)
pure virtual

Occurs when the recorded audio frame is received.

Parameters
audioFrameThe reference to the audio frame: AudioFrame.
Returns
  • true: The recorded audio frame is valid and is encoded and sent.
  • false: The recorded audio frame is invalid and is not encoded or sent.

◆ onPlaybackAudioFrame()

virtual bool agora::media::IAudioFrameObserver::onPlaybackAudioFrame ( AudioFrame audioFrame)
pure virtual

Occurs when the playback audio frame is received.

Parameters
audioFrameThe reference to the audio frame: AudioFrame.
Returns
  • true: The playback audio frame is valid and is encoded and sent.
  • false: The playback audio frame is invalid and is not encoded or sent.

◆ onMixedAudioFrame()

virtual bool agora::media::IAudioFrameObserver::onMixedAudioFrame ( AudioFrame audioFrame)
pure virtual

Occurs when the mixed audio data is received.

Parameters
audioFrameThe reference to the audio frame: AudioFrame.
Returns
  • true: The mixed audio data is valid and is encoded and sent.
  • false: The mixed audio data is invalid and is not encoded or sent.

◆ onPlaybackAudioFrameBeforeMixing()

virtual bool agora::media::IAudioFrameObserver::onPlaybackAudioFrameBeforeMixing ( unsigned int  uid,
AudioFrame audioFrame 
)
pure virtual

Occurs when the before-mixing playback audio frame is received.

Parameters
uidID of the remote user.
audioFrameThe reference to the audio frame: AudioFrame.
Returns
  • true: The before-mixing playback audio frame is valid and is encoded and sent.
  • false: The before-mixing playback audio frame is invalid and is not encoded or sent.