Server Gateway SDK v3.8.202.20 for Linux C++
Public Member Functions | Protected Member Functions | List of all members
agora::rtc::IAudioPcmDataSender Class Referenceabstract

#include <NGIAgoraMediaNode.h>

Public Member Functions

virtual int sendAudioPcmData (const void *audio_data, uint32_t capture_timestamp, const size_t samples_per_channel, const agora::rtc::BYTES_PER_SAMPLE bytes_per_sample, const size_t number_of_channels, const uint32_t sample_rate)=0

Protected Member Functions

 ~IAudioPcmDataSender ()

Detailed Description

The IAudioPcmDataSender class.

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

Constructor & Destructor Documentation

◆ ~IAudioPcmDataSender()

agora::rtc::IAudioPcmDataSender::~IAudioPcmDataSender ( )

Member Function Documentation

◆ sendAudioPcmData()

virtual int agora::rtc::IAudioPcmDataSender::sendAudioPcmData ( const void *  audio_data,
uint32_t  capture_timestamp,
const size_t  samples_per_channel,
const agora::rtc::BYTES_PER_SAMPLE  bytes_per_sample,
const size_t  number_of_channels,
const uint32_t  sample_rate 
pure virtual

Sends the PCM audio data to the local audio track.

audio_dataThe PCM audio data to be sent.
capture_timestampThe time (ms) when the audio sample is captured.
samples_per_channelThe number of audio samples in 10 ms for each audio channel.
bytes_per_sampleThe number of bytes in each sample.
number_of_channelsThe number of audio channels.
sample_rateThe sample rate (Hz). The minimum value is 8000.
  • 0: Success.
  • < 0: Failure.

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