Developer Center
Voice Call
API Reference
Agora C++ API Reference for All Platforms
Agora C++ API Reference for All Platforms
◆ type
◆ samples
int agora::media::IAudioFrameObserver::AudioFrame::samples |
Number of samples in the audio frame: samples = (int)samplesPerCall = (int)(sampleRate × sampleInterval)
◆ bytesPerSample
int agora::media::IAudioFrameObserver::AudioFrame::bytesPerSample |
Number of bytes per audio sample. For example, each PCM audio sample usually takes up 16 bits (2 bytes).
◆ channels
int agora::media::IAudioFrameObserver::AudioFrame::channels |
Number of audio channels.
- 1: Mono
- 2: Stereo (the data is interleaved)
◆ samplesPerSec
int agora::media::IAudioFrameObserver::AudioFrame::samplesPerSec |
Audio frame sample rate: 8000, 16000, 32000, 44100, or 48000 Hz.
◆ buffer
void* agora::media::IAudioFrameObserver::AudioFrame::buffer |
Audio frame data buffer. The valid data length is: samples × channels × bytesPerSample
◆ renderTimeMs
int64_t agora::media::IAudioFrameObserver::AudioFrame::renderTimeMs |
The timestamp of the external audio frame. It is mandatory. You can use this parameter for the following purposes:
- Restore the order of the captured audio frame.
- Synchronize audio and video frames in video-related scenarios, including scenarios where external video sources are used.
◆ avsync_type
int agora::media::IAudioFrameObserver::AudioFrame::avsync_type |