|
Agora Java API Reference for Android
|
Raw audio data. More...
Public Member Functions | |
| AudioFrame (ByteBuffer buffer, int sampleRataHz, int bytesPerSample, int channelNums, int samplesPerChannel, long timestamp) | |
| ByteBuffer | getByteBuffer () |
| int | getBytesPerSample () |
| int | getChannelNums () |
| int | getSampleRataHz () |
| int | getSamplesPerChannel () |
| long | getTimestamp () |
| String | toString () |
Public Attributes | |
| ByteBuffer | buffer |
| int | sampleRataHz |
| int | bytesPerSample |
| int | channelNums |
| int | samplesPerChannel |
| long | timestamp |
Raw audio data.
| ByteBuffer io.agora.base.AudioFrame.buffer |
The data buffer of the audio frame. When the audio frame uses a stereo channel, the data buffer is interleaved. The size of the data buffer is as follows: buffer = samples × channels × bytesPerSample.
| int io.agora.base.AudioFrame.sampleRataHz |
The number of samples per channel in the audio frame.
| int io.agora.base.AudioFrame.bytesPerSample |
The number of bytes per sample. For PCM, this parameter is generally set to 16 bits (2 bytes).
| int io.agora.base.AudioFrame.channelNums |
The number of audio channels (the data are interleaved if it is stereo).
| int io.agora.base.AudioFrame.samplesPerChannel |
The number of samples per channel in the audio frame.
| long io.agora.base.AudioFrame.timestamp |
The timestamp (ms) of the audio frame.
1.8.18