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

  buffer | The audio frame payload.
  samplesPerChannel | The samples per channel.
  channels | The number of audio channels. If the channel uses stereo, the data is interleaved. 1: Mono. 2: Stereo.
  samplesPerSec | The number of samples per channel per second in the audio frame.
  codecType | The 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

  buffer | The audio frame payload.
  samplesPerChannel | The samples per channel.
  channels | The number of audio channels. If the channel uses stereo, the data is interleaved. 1: Mono. 2: Stereo.
  samplesPerSec | The number of samples per channel per second in the audio frame.
  codecType | The 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

  buffer | The audio frame payload.
  samplesPerChannel | The samples per channel.
  channels | The number of audio channels. If the channel uses stereo, the data is interleaved. 1: Mono. 2: Stereo.
  samplesPerSec | The number of samples per channel per second in the audio frame.
  codecType | The codec type.