class AgoraAudioFrameObserverWrapper extends java.lang.Object implements IAudioFrameObserver
| Modifier and Type | Field and Description |
|---|---|
private IAudioFrameObserver |
audioFrameObserver |
private boolean |
enableVad |
private AgoraAudioVadManager |
vadManager |
private VadProcessResult |
vadProcessResult |
| Constructor and Description |
|---|
AgoraAudioFrameObserverWrapper(IAudioFrameObserver observer,
boolean enableVad,
AgoraAudioVadConfigV2 vadConfig) |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
int |
getObservedAudioFramePosition() |
int |
onEarMonitoringAudioFrame(AgoraLocalUser agoraLocalUser,
AudioFrame frame)
Note: To improve data transmission efficiency, the buffer of the frame object
is a DirectByteBuffer.
|
int |
onMixedAudioFrame(AgoraLocalUser agoraLocalUser,
java.lang.String channelId,
AudioFrame frame)
Note: To improve data transmission efficiency, the buffer of the frame object
is a DirectByteBuffer.
|
int |
onPlaybackAudioFrame(AgoraLocalUser agoraLocalUser,
java.lang.String channelId,
AudioFrame frame)
Note: To improve data transmission efficiency, the buffer of the frame object
is a DirectByteBuffer.
|
int |
onPlaybackAudioFrameBeforeMixing(AgoraLocalUser agoraLocalUser,
java.lang.String channelId,
java.lang.String userId,
AudioFrame frame,
VadProcessResult vadResult)
Note: To improve data transmission efficiency, the buffer of the frame object
is a DirectByteBuffer.
|
int |
onRecordAudioFrame(AgoraLocalUser agoraLocalUser,
java.lang.String channelId,
AudioFrame frame)
Note: To improve data transmission efficiency, the buffer of the frame object
is a DirectByteBuffer.
|
private volatile IAudioFrameObserver audioFrameObserver
private volatile boolean enableVad
private volatile AgoraAudioVadManager vadManager
private volatile VadProcessResult vadProcessResult
public AgoraAudioFrameObserverWrapper(IAudioFrameObserver observer, boolean enableVad, AgoraAudioVadConfigV2 vadConfig)
public void destroy()
public int onRecordAudioFrame(AgoraLocalUser agoraLocalUser, java.lang.String channelId, AudioFrame frame)
IAudioFrameObserverUtils.getBytes(ByteBuffer).onRecordAudioFrame in interface IAudioFrameObserveragoraLocalUser - the local userchannelId - the channel idframe - the audio framepublic int onPlaybackAudioFrame(AgoraLocalUser agoraLocalUser, java.lang.String channelId, AudioFrame frame)
IAudioFrameObserverUtils.getBytes(ByteBuffer).onPlaybackAudioFrame in interface IAudioFrameObserveragoraLocalUser - the local userchannelId - the channel idframe - the audio framepublic int onMixedAudioFrame(AgoraLocalUser agoraLocalUser, java.lang.String channelId, AudioFrame frame)
IAudioFrameObserverUtils.getBytes(ByteBuffer).onMixedAudioFrame in interface IAudioFrameObserveragoraLocalUser - the local userchannelId - the channel idframe - the audio framepublic int onEarMonitoringAudioFrame(AgoraLocalUser agoraLocalUser, AudioFrame frame)
IAudioFrameObserverUtils.getBytes(ByteBuffer).onEarMonitoringAudioFrame in interface IAudioFrameObserveragoraLocalUser - the local userframe - the audio framepublic int onPlaybackAudioFrameBeforeMixing(AgoraLocalUser agoraLocalUser, java.lang.String channelId, java.lang.String userId, AudioFrame frame, VadProcessResult vadResult)
IAudioFrameObserverUtils.getBytes(ByteBuffer).onPlaybackAudioFrameBeforeMixing in interface IAudioFrameObserveragoraLocalUser - the local userchannelId - the channel iduserId - the user idframe - the audio framevadResult - the vad resultpublic int getObservedAudioFramePosition()
getObservedAudioFramePosition in interface IAudioFrameObserver