|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javaFlacEncoder.Frame
public class Frame
Handles taking a set of audio samples, and splitting it into the proper subframes, and returning the resulting encoded data. This object will do any calculations needed for preparing the “channel configuration” used in encoding, such as mid-side or left-right(based upon the given configuration).
Field Summary | |
---|---|
static int |
DEBUG_LEV
For debugging: Higher level equals more output(generally in increments of 10 |
Constructor Summary | |
---|---|
Frame(StreamConfiguration sc)
Constructor. |
Method Summary | |
---|---|
int |
encodeSamples_OLD(int[] samples,
int count,
int start,
int skip,
EncodedElement result,
long frameNumber)
Encodes samples into the appropriate compressed format, saving the result in the given “data” EncodedElement list. |
int |
encodeSamples(int[] samples,
int count,
int start,
int skip,
EncodedElement result,
long frameNumber)
Encodes samples into the appropriate compressed format, saving the result in the given “data” EncodedElement list. |
int |
getEncodedSize()
Returns the total number of valid bits used in the last encoding(i.e, the number of compressed bits used). |
boolean |
registerConfiguration(EncodingConfiguration ec)
This method is used to set the encoding configuration. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int DEBUG_LEV
Constructor Detail |
---|
public Frame(StreamConfiguration sc)
sc
- StreamConfiguration to use for encoding with this frame.Method Detail |
---|
public boolean registerConfiguration(EncodingConfiguration ec)
ec
- encoding configuration to use.
true
if configuration was changed.
false
otherwise(i.e, and encoding process was active
at the time of change)public int encodeSamples_OLD(int[] samples, int count, int start, int skip, EncodedElement result, long frameNumber)
samples
- the audio samples to encode. This array may contain
samples for multiple channels, interleaved; only one of
these channels is encoded by a subframe.count
- the number of samples to encode.start
- the index to start at in the array.skip
- the number of indices to skip between successive samples
(for use when channels are interleaved in the given
array).data
- the EncodedElement to attach encoded data to. Data in
Encoded Element given is not altered. New data is
attached starting with “data.getNext()”. If “data”
already has a “next” set, it will be lost!
public int encodeSamples(int[] samples, int count, int start, int skip, EncodedElement result, long frameNumber)
samples
- the audio samples to encode. This array may contain
samples for multiple channels, interleaved; only one of
these channels is encoded by a subframe.count
- the number of samples to encode.start
- the index to start at in the array.skip
- the number of indices to skip between successive samples
(for use when channels are interleaved in the given
array).data
- the EncodedElement to attach encoded data to. Data in
Encoded Element given is not altered. New data is
attached starting with “data.getNext()”. If “data”
already has a “next” set, it will be lost!
public int getEncodedSize()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |