Agora Java API Reference for Android
io.agora.rtc.AudioFrame Class Reference

Public Member Functions

 AudioFrame (ByteBuffer samples, int numOfSamples, int bytesPerSample, int channels, int samplesPerSec)
 
String toString ()
 

Public Attributes

ByteBuffer samples
 
int numOfSamples
 
int bytesPerSample
 
int channels
 
int samplesPerSec
 

Detailed Description

The AudioFrame class.

Since
v3.4.5

After you successfully register the audio observer, the SDK triggers the following callbacks to report the observed audio data:

Member Data Documentation

◆ samples

ByteBuffer io.agora.rtc.AudioFrame.samples

The buffer of the sample audio data, which is in the DirectByteBuffer format.

◆ numOfSamples

int io.agora.rtc.AudioFrame.numOfSamples

The number of samples.

◆ bytesPerSample

int io.agora.rtc.AudioFrame.bytesPerSample

The number of bytes per audio sample. For example, each PCM audio sample usually takes up 16 bits (2 bytes).

◆ channels

int io.agora.rtc.AudioFrame.channels

The number of audio channels. If the channel uses stereo, the data is interleaved.

  • 1: Mono
  • 2: Stereo

◆ samplesPerSec

int io.agora.rtc.AudioFrame.samplesPerSec

The sample rate.