Agora Java API Reference for Android
|
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 |
The AudioFrame
class.
After you successfully register the audio observer, the SDK triggers the following callbacks to report the observed audio data:
ByteBuffer io.agora.rtc.AudioFrame.samples |
The buffer of the sample audio data, which is in the DirectByteBuffer
format.
int io.agora.rtc.AudioFrame.numOfSamples |
The number of samples.
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).
int io.agora.rtc.AudioFrame.channels |
The number of audio channels. If the channel uses stereo, the data is interleaved.
1
: Mono2
: Stereo int io.agora.rtc.AudioFrame.samplesPerSec |
The sample rate.