Agora Server Gateway SDK C++ API Reference
Public Member Functions | List of all members
agora::media::IAudioFrameObserver Class Referenceabstract

#include <AgoraMediaBase.h>

Public Member Functions

virtual bool onPlaybackAudioFrameBeforeMixing (const char *channelId, rtc::uid_t uid, AudioFrame &audioFrame)=0
 
virtual bool onPlaybackAudioFrameBeforeMixing (const char *channelId, base::user_id_t userId, AudioFrame &audioFrame)
 
- Public Member Functions inherited from agora::media::IAudioFrameObserverBase
virtual ~IAudioFrameObserverBase ()
 
virtual bool onRecordAudioFrame (const char *channelId, AudioFrame &audioFrame)=0
 
virtual bool onPlaybackAudioFrame (const char *channelId, AudioFrame &audioFrame)=0
 
virtual bool onMixedAudioFrame (const char *channelId, AudioFrame &audioFrame)=0
 

Additional Inherited Members

- Public Types inherited from agora::media::IAudioFrameObserverBase
enum  AUDIO_FRAME_TYPE { FRAME_TYPE_PCM16 = 0 }
 

Detailed Description

The IAudioFrameObserver class.

Member Function Documentation

◆ onPlaybackAudioFrameBeforeMixing() [1/2]

virtual bool agora::media::IAudioFrameObserverBase::onPlaybackAudioFrameBeforeMixing ( const char *  channelId,
base::user_id_t  userId,
AudioFrame audioFrame 
)
inlinevirtual

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

Parameters
channelIdA null pointer
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.

Reimplemented from agora::media::IAudioFrameObserverBase.

◆ onPlaybackAudioFrameBeforeMixing() [2/2]

virtual bool agora::media::IAudioFrameObserver::onPlaybackAudioFrameBeforeMixing ( const char *  channelId,
rtc::uid_t  uid,
AudioFrame audioFrame 
)
pure virtual

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

Parameters
channelIdA null pointer.
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.

The documentation for this class was generated from the following file: