NERtc Unity SDK
V4.5.907
|
Public Member Functions | |
void | OnAudioFrameDidRecord (RtcAudioFrame frame) |
void | OnAudioFrameWillPlayback (RtcAudioFrame frame) |
void | OnMixedAudioFrame (RtcAudioFrame frame) |
void | OnPlaybackAudioFrameBeforeMixing (ulong userId, RtcAudioFrame frame, ulong cid) |
The voice observer object.
Some APIs allow you to modify the content that 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.
void nertc.IAudioFrameObserver.OnAudioFrameDidRecord | ( | RtcAudioFrame | frame | ) |
Callback called when audio data is captured.
frame | Audio frame. |
void nertc.IAudioFrameObserver.OnAudioFrameWillPlayback | ( | RtcAudioFrame | frame | ) |
Callback called when audio data is playing.
frame | Audio frame. |
void nertc.IAudioFrameObserver.OnMixedAudioFrame | ( | RtcAudioFrame | frame | ) |
Callback called when captured audio data is mixed.
frame | Audio frame. |
void nertc.IAudioFrameObserver.OnPlaybackAudioFrameBeforeMixing | ( | ulong | userId, |
RtcAudioFrame | frame, | ||
ulong | cid | ||
) |
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.
userId | The ID of a remote user. |
frame | The audio frame. |
cid | The ID of the channel. In multi-channel scenarios, channelId is used to identify different channels. |