Agora C++ API Reference for All Platforms
Public Member Functions | Protected Member Functions | List of all members
agora::rtc::IAudioEncodedFrameSender Class Referenceabstract

Inherits agora::RefCountInterface.

Inherited by agora::rtc::IAudioEncodedFrameSenderEx.

Public Member Functions

virtual bool sendEncodedAudioFrame (const uint8_t *payload_data, size_t payload_size, const EncodedAudioFrameInfo &audioFrameInfo)=0
 
- Public Member Functions inherited from agora::RefCountInterface
virtual void AddRef () const =0
 
virtual RefCountReleaseStatus Release () const =0
 
virtual bool HasOneRef () const =0
 

Protected Member Functions

 ~IAudioEncodedFrameSender ()
 
- Protected Member Functions inherited from agora::RefCountInterface
virtual ~RefCountInterface ()
 

Detailed Description

The IAudioEncodedFrameSender class.

In scenarios involving custom audio source, you can use the IAudioEncodedFrameSender class to send encoded audio data directly to the audio track. If the track is disabled, the sent audio data will be automatically discarded.

Constructor & Destructor Documentation

◆ ~IAudioEncodedFrameSender()

agora::rtc::IAudioEncodedFrameSender::~IAudioEncodedFrameSender ( )
inlineprotected

Member Function Documentation

◆ sendEncodedAudioFrame()

virtual bool agora::rtc::IAudioEncodedFrameSender::sendEncodedAudioFrame ( const uint8_t *  payload_data,
size_t  payload_size,
const EncodedAudioFrameInfo audioFrameInfo 
)
pure virtual

Sends the encoded audio frame to the local audio track.

Parameters
payload_dataThe pointer to the payload data.
payload_sizeThe payload size.
audioFrameInfoThe reference to the information of the audio frame: EncodedAudioFrameInfo.
Returns
  • true: Success.
  • false: Failure.