Developer Center
Voice Call
API Reference
Agora C++ API Reference for All Platforms
Agora C++ API Reference for All Platforms
◆ AUDIO_FRAME_TYPE
The frame type.
Enumerator |
---|
FRAME_TYPE_PCM16 | 0: PCM16.
|
◆ onRecordAudioFrame()
virtual bool agora::media::IAudioFrameObserver::onRecordAudioFrame |
( |
AudioFrame & |
audioFrame | ) |
|
|
pure virtual |
Retrieves the recorded audio frame.
The SDK triggers this callback once every 10 ms.
- Parameters
-
- Returns
- true: Valid buffer in AudioFrame, and the recorded audio frame is sent out.
- false: Invalid buffer in AudioFrame, and the recorded audio frame is discarded.
◆ onPlaybackAudioFrame()
virtual bool agora::media::IAudioFrameObserver::onPlaybackAudioFrame |
( |
AudioFrame & |
audioFrame | ) |
|
|
pure virtual |
Retrieves the audio playback frame every 10 ms for getting the audio.
- Parameters
-
- Returns
- true: Valid buffer in AudioFrame, and the audio playback frame is sent out.
- false: Invalid buffer in AudioFrame, and the audio playback frame is discarded.
◆ onMixedAudioFrame()
virtual bool agora::media::IAudioFrameObserver::onMixedAudioFrame |
( |
AudioFrame & |
audioFrame | ) |
|
|
pure virtual |
Retrieves the mixed recorded and playback audio frame.
The SDK triggers this callback once every 10 ms.
- Note
- This callback only returns the single-channel data.
- Parameters
-
- Returns
- true: Valid buffer in AudioFrame and the mixed recorded and playback audio frame is sent out.
- false: Invalid buffer in AudioFrame and the mixed recorded and playback audio frame is discarded.
◆ onPlaybackAudioFrameBeforeMixing()
virtual bool agora::media::IAudioFrameObserver::onPlaybackAudioFrameBeforeMixing |
( |
unsigned int |
uid, |
|
|
AudioFrame & |
audioFrame |
|
) |
| |
|
pure virtual |
Retrieves the audio frame of a specified user before mixing.
The SDK triggers this callback once every 10 ms.
- Parameters
-
- Returns
- true: Valid buffer in AudioFrame, and the mixed recorded and playback audio frame is sent out.
- false: Invalid buffer in AudioFrame, and the mixed recorded and playback audio frame is discarded.