NERtc Windows SDK  V4.4.301
Public 成员函数 | 所有成员列表
nertc::INERtcAudioFrameObserver类 参考abstract

#include <nertc_engine_defines.h>

Public 成员函数

virtual void onAudioFrameDidRecord (NERtcAudioFrame *frame)=0
 
virtual void onAudioFrameWillPlayback (NERtcAudioFrame *frame)=0
 
virtual void onMixedAudioFrame (NERtcAudioFrame *frame)=0
 
virtual void onPlaybackAudioFrameBeforeMixing (uint64_t userID, NERtcAudioFrame *frame)=0
 

详细描述

The voice observer object.

Some APIs allow you to modify the content that void *data points to in the frame. However, you cannot modify the format. If you need to modify the format, you must call the corresponding setting interface.

成员函数说明

◆ onAudioFrameDidRecord()

virtual void nertc::INERtcAudioFrameObserver::onAudioFrameDidRecord ( NERtcAudioFrame frame)
pure virtual

Occurs when the audio data is captured. The callback is used to process the audio data.

注解
  • The returned audio data has read and write permissions.
  • The callback is triggered when an operation is driven by the local audio data.
参数
frameThe audio frame.

◆ onAudioFrameWillPlayback()

virtual void nertc::INERtcAudioFrameObserver::onAudioFrameWillPlayback ( NERtcAudioFrame frame)
pure virtual

Occurs when the audio data is played back. The callback is used to process the audio data.

注解
  • The returned audio data has read and write permissions.
  • The callback is triggered when an operation is driven by the local audio data.
参数
frameThe audio frame.

◆ onMixedAudioFrame()

virtual void nertc::INERtcAudioFrameObserver::onMixedAudioFrame ( NERtcAudioFrame frame)
pure virtual

Gets the raw audio data of the local user and all remote users after mixing.

注解
  • The returned audio data is read-only.
  • The callback is triggered when an operation is driven by the local audio data.
参数
frameThe audio frame.

◆ onPlaybackAudioFrameBeforeMixing()

virtual void nertc::INERtcAudioFrameObserver::onPlaybackAudioFrameBeforeMixing ( uint64_t  userID,
NERtcAudioFrame frame 
)
pure virtual

Gets the raw audio data of a specified remote user before audio mixing.

After the audio observer is registered, if the remote audio is subscribed by default and the remote user enables the audio, the SDK triggers this callback when the audio data before audio mixing is captured, and the audio data is returned to the user.

注解
  • The returned audio data is read-only.
参数
userIDThe ID of a remote user.
frameThe audio frame.

该类的文档由以下文件生成: