public class Frame extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEBUG_LEV
For debugging: Higher level equals more output(generally in increments
of 10
|
| Constructor and Description |
|---|
Frame(StreamConfiguration sc)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
public static int DEBUG_LEV
public Frame(StreamConfiguration sc)
sc - StreamConfiguration to use for encoding with this frame.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).result - 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).result - 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()
Copyright © 2017. All rights reserved.