Maven module :un.storage : media-aac :
Class : un.storage.media.aac.SampleBuffer
Extends/Implements : -
Subclasses : -

The SampleBuffer holds the decoded AAC frame. It contains the raw PCM data
and its format.
author  Alexander Simm


Variables : -
Functions : SampleBuffer, getData, getSampleRate, getChannels, getBitsPerSample, getLength, getBitrate, getEncodedBitrate, isBigEndian, setBigEndian, setData



public void SampleBuffer ()


Returns the buffer's PCM data.
return  the audio data
public byte[] getData ()


Returns the data's sample rate.
return  the sample rate
public int getSampleRate ()


Returns the number of channels stored in the data buffer.
return  the number of channels
public int getChannels ()


Returns the number of bits per sample. Usually this is 16, meaning a
sample is stored in two bytes.
return  the number of bits per sample
public int getBitsPerSample ()


Returns the length of the current frame in seconds.
length = samplesPerChannel / sampleRate
return  the length in seconds
public double getLength ()


Returns the bitrate of the decoded PCM data.
bitrate = (samplesPerChannel * bitsPerSample) / length
@return the bitrate
public double getBitrate ()


Returns the AAC bitrate of the current frame.
return  the AAC bitrate
public double getEncodedBitrate ()


Indicates the endianness for the data.
return  true if the data is in big endian, false if it is in little endian
public boolean isBigEndian ()


Sets the endianness for the data.
param  bigEndian if true the data will be in big endian, else in little
endian
public void setBigEndian (boolean bigEndian)

public void setData (byte[] data, int sampleRate, int channels, int bitsPerSample, int bitsRead)