Agora Java API Reference for Android
Public Member Functions | List of all members
io.agora.rtc2.IAudioEncodedFrameObserver Interface Reference

Public Member Functions

abstract void onRecordAudioEncodedFrame (ByteBuffer buffer, int samplesPerChannel, int channels, int samplesPerSec, int codecType)
 
abstract void onPlaybackAudioEncodedFrame (ByteBuffer buffer, int samplesPerChannel, int channels, int samplesPerSec, int codecType)
 
abstract void onMixedAudioEncodedFrame (ByteBuffer buffer, int samplesPerChannel, int channels, int samplesPerSec, int codecType)
 

Member Function Documentation

◆ onRecordAudioEncodedFrame()

abstract void io.agora.rtc2.IAudioEncodedFrameObserver.onRecordAudioEncodedFrame ( ByteBuffer  buffer,
int  samplesPerChannel,
int  channels,
int  samplesPerSec,
int  codecType 
)
abstract

Occurs when the recorded audio frame is received.

Parameters
bufferThe audio frame payload.
samplesPerChannelThe samples per channel.
channelsThe number of audio channels. If the channel uses stereo, the data is interleaved.
  • 1: Mono.
  • 2: Stereo.
samplesPerSecThe number of samples per channel per second in the audio frame.
codecTypeThe codec type.

◆ onPlaybackAudioEncodedFrame()

abstract void io.agora.rtc2.IAudioEncodedFrameObserver.onPlaybackAudioEncodedFrame ( ByteBuffer  buffer,
int  samplesPerChannel,
int  channels,
int  samplesPerSec,
int  codecType 
)
abstract

Occurs when the playback audio frame is received.

Parameters
bufferThe audio frame payload.
samplesPerChannelThe samples per channel.
channelsThe number of audio channels. If the channel uses stereo, the data is interleaved.
  • 1: Mono.
  • 2: Stereo.
samplesPerSecThe number of samples per channel per second in the audio frame.
codecTypeThe codec type.

◆ onMixedAudioEncodedFrame()

abstract void io.agora.rtc2.IAudioEncodedFrameObserver.onMixedAudioEncodedFrame ( ByteBuffer  buffer,
int  samplesPerChannel,
int  channels,
int  samplesPerSec,
int  codecType 
)
abstract

Occurs when the mixed playback audio frame is received.

Parameters
bufferThe audio frame payload.
samplesPerChannelThe samples per channel.
channelsThe number of audio channels. If the channel uses stereo, the data is interleaved.
  • 1: Mono.
  • 2: Stereo.
samplesPerSecThe number of samples per channel per second in the audio frame.
codecTypeThe codec type.