public class SampleBuffer
extends java.lang.Object
Constructor and Description |
---|
SampleBuffer() |
Modifier and Type | Method and Description |
---|---|
double |
getBitrate()
Returns the bitrate of the decoded PCM data.
|
int |
getBitsPerSample()
Returns the number of bits per sample.
|
int |
getChannels()
Returns the number of channels stored in the data buffer.
|
byte[] |
getData()
Returns the buffer's PCM data.
|
double |
getEncodedBitrate()
Returns the AAC bitrate of the current frame.
|
double |
getLength()
Returns the length of the current frame in seconds.
|
int |
getSampleRate()
Returns the data's sample rate.
|
boolean |
isBigEndian()
Indicates the endianness for the data.
|
void |
setBigEndian(boolean bigEndian)
Sets the endianness for the data.
|
void |
setData(byte[] data,
int sampleRate,
int channels,
int bitsPerSample,
int bitsRead) |
public byte[] getData()
public int getSampleRate()
public int getChannels()
public int getBitsPerSample()
public double getLength()
public double getBitrate()
bitrate = (samplesPerChannel * bitsPerSample) / length
public double getEncodedBitrate()
public boolean isBigEndian()
public void setBigEndian(boolean bigEndian)
bigEndian
- if true the data will be in big endian, else in little
endianpublic void setData(byte[] data, int sampleRate, int channels, int bitsPerSample, int bitsRead)