AudioFrame
Raw audio data.
public class AudioFrame {
public ByteBuffer buffer;
public int sampleRataHz;
public int bytesPerSample;
public int channelNums;
public int samplesPerChannel;
public long timestamp;
}
Properties
- buffer
- The data buffer of the audio frame. When the audio frame uses stereo channels, the data buffer is interleaved. The buffer size is calculated as:
buffer=samples×channels×bytesPerSample. - sampleRataHz
- The sampling rate per channel in the audio frame (in Hz).
- bytesPerSample
- The number of bytes per sample. For PCM data, it is typically 16 bits (2 bytes).
- channelNums
- The number of audio channels (interleaved for stereo).
- 1: Mono.
- 2: Stereo.
- samplesPerChannel
- The number of samples per channel in the audio frame.
- timestamp
- The timestamp of the audio frame (in milliseconds).