Agora C++ API Reference for All Platforms
Classes | Public Types | Public Member Functions | List of all members
agora::media::IAudioFrameObserverBase Class Referenceabstract

Inherited by agora::media::IAudioFrameObserver.

Classes

struct  AudioFrame
 

Public Types

enum  AUDIO_FRAME_TYPE { FRAME_TYPE_PCM16 = 0 }
 

Public Member Functions

virtual ~IAudioFrameObserverBase ()
 
virtual bool onRecordAudioFrame (AudioFrame &audioFrame)=0
 
virtual bool onPlaybackAudioFrame (AudioFrame &audioFrame)=0
 
virtual bool onMixedAudioFrame (AudioFrame &audioFrame)=0
 
virtual bool onPlaybackAudioFrameBeforeMixing (base::user_id_t userId, AudioFrame &audioFrame)
 

Detailed Description

The IAudioFrameObserverBase class.

Member Enumeration Documentation

◆ AUDIO_FRAME_TYPE

Audio frame types.

Enumerator
FRAME_TYPE_PCM16 

0: 16-bit PCM.

Constructor & Destructor Documentation

◆ ~IAudioFrameObserverBase()

virtual agora::media::IAudioFrameObserverBase::~IAudioFrameObserverBase ( )
inlinevirtual

Member Function Documentation

◆ onRecordAudioFrame()

virtual bool agora::media::IAudioFrameObserverBase::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::IAudioFrameObserverBase::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::IAudioFrameObserverBase::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::IAudioFrameObserverBase::onPlaybackAudioFrameBeforeMixing ( base::user_id_t  userId,
AudioFrame audioFrame 
)
inlinevirtual

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

Parameters
userIdID 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.