Agora C++ API Reference for All Platforms
|
Public Member Functions | |
AudioFrame () | |
Public Attributes | |
AUDIO_FRAME_TYPE | type |
int | samplesPerChannel |
agora::rtc::BYTES_PER_SAMPLE | bytesPerSample |
int | channels |
int | samplesPerSec |
void * | buffer |
int64_t | renderTimeMs |
int | avsync_type |
int64_t | presentationMs |
The definition of the AudioFrame struct.
|
inline |
AUDIO_FRAME_TYPE agora::media::IAudioFrameObserverBase::AudioFrame::type |
The audio frame type: AUDIO_FRAME_TYPE.
int agora::media::IAudioFrameObserverBase::AudioFrame::samplesPerChannel |
The number of samples per channel in this frame.
agora::rtc::BYTES_PER_SAMPLE agora::media::IAudioFrameObserverBase::AudioFrame::bytesPerSample |
The number of bytes per sample: #BYTES_PER_SAMPLE
int agora::media::IAudioFrameObserverBase::AudioFrame::channels |
The number of audio channels (data is interleaved, if stereo).
int agora::media::IAudioFrameObserverBase::AudioFrame::samplesPerSec |
The sample rate
void* agora::media::IAudioFrameObserverBase::AudioFrame::buffer |
The data buffer of the audio frame. When the audio frame uses a stereo channel, the data buffer is interleaved.
Buffer data size: buffer = samplesPerChannel × channels × bytesPerSample.
int64_t agora::media::IAudioFrameObserverBase::AudioFrame::renderTimeMs |
The timestamp to render the audio data.
You can use this timestamp to restore the order of the captured audio frame, and synchronize audio and video frames in video scenarios, including scenarios where external video sources are used.
int agora::media::IAudioFrameObserverBase::AudioFrame::avsync_type |
A reserved parameter.
int64_t agora::media::IAudioFrameObserverBase::AudioFrame::presentationMs |
A reserved parameter.
You can use this presentationMs parameter to indicate the presenation milisecond timestamp, this will then filled into audio4 extension part, the remote side could use this pts in av sync process with video frame.