public class Subframe_Fixed extends Subframe
Modifier and Type | Field and Description |
---|---|
static int |
DEBUG_LEV
For debugging: Higher values equals greater output, generally in
increments of 10
|
static EncodingConfiguration.SubframeType |
type
Subframe type supported by this implementation.
|
ec, lastEncodedSize, sc
Constructor and Description |
---|
Subframe_Fixed(StreamConfiguration sc)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
encodeSamples(int[] samples,
int count,
int start,
int skip,
EncodedElement dataEle,
int offset,
int unencSampleSize)
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,
int offset,
int unencSampleSize) |
int |
estimatedSize()
Return the estimated size of the previous encode attempt in bits.
|
EncodedElement |
getData() |
EncodedElement |
getData(EncodedElement dataEle)
Get the data from the last encode attempt.
|
boolean |
registerConfiguration(EncodingConfiguration ec)
This method is used to set the encoding configuration.
|
getEncodedSize
public static int DEBUG_LEV
public static final EncodingConfiguration.SubframeType type
public Subframe_Fixed(StreamConfiguration sc)
sc
- StreamConfiguration to use for encoding.public boolean registerConfiguration(EncodingConfiguration ec)
registerConfiguration
in class Subframe
ec
- encoding configuration to use.public int encodeSamples(int[] samples, int count, int start, int skip, int offset, int unencSampleSize)
public int estimatedSize()
public EncodedElement getData()
public EncodedElement getData(EncodedElement dataEle)
public int encodeSamples(int[] samples, int count, int start, int skip, EncodedElement dataEle, int offset, int unencSampleSize)
Subframe
encodeSamples
in class Subframe
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).dataEle
- the EncodedElement to attach encoded data to. Data in
EncodedElement given is not altered. New data is
attached starting with “data.getNext()”. If “data”
already has a “next” set, it will be lost!unencSampleSize
- Number of bits per single-channel sample. This may
differ from the StreamConfiguration's sample size, depending on the
subframe used(i.e, the "side-channel" of a FLAC stream uses one extra bit
compared to the input channels).