AgoraAudioFrameDelegate
The audio frame observer.
You can call setAudioFrameDelegate to register or unregister the AgoraAudioFrameDelegate audio frame observer.
onMixedAudioFrame
Retrieves the mixed captured and playback audio frame.
- (BOOL)onMixedAudioFrame:(AgoraAudioFrame* _Nonnull)frame;
Attention: This callback only returns the single-channel data.
Parameters
- frame
- The playback audio frame. For details, see AgoraAudioFrame.
Returns
YES
: The mixed audio data is valid and is encoded and sent.NO
: The mixed audio data is invalid and is not encoded or sent.
onPlaybackAudioFrame
Gtes the audio frame for playback.
- (BOOL)onPlaybackAudioFrame:(AgoraAudioFrame* _Nonnull)frame;
Parameters
- frame
- The playback audio frame. For details, see AgoraAudioFrame.
Returns
YES
: The mixed audio data is valid and is encoded and sent.NO
: The mixed audio data is invalid and is not encoded or sent.
onPlaybackAudioFrameBeforeMixing
Retrieves the audio frame of a specified user before mixing.
- (BOOL)onPlaybackAudioFrameBeforeMixing:(AgoraAudioFrame* _Nonnull)frame uid:(NSUInteger)uid;
Parameters
- uid
- The user ID of the specified user.
- frame
- The audio frame. For details, see AgoraAudioFrame.
Returns
YES
: The mixed audio data is valid and is encoded and sent.NO
: The mixed audio data is invalid and is not encoded or sent.
onRecordAudioFrame
Gets the captured audio frame.
- (BOOL)onRecordAudioFrame:(AgoraAudioFrame* _Nonnull)frame;
Parameters
- frame
- The playback audio frame. For details, see AgoraAudioFrame.
Returns
YES
: The mixed audio data is valid and is encoded and sent.NO
: The mixed audio data is invalid and is not encoded or sent.