Decoder class encapsulates the details of decoding an MPEG audio frame.
| Modifier and Type | Field and Description |
|---|---|
| public static final int | DECODER_ERROR
The first decoder error code. |
| private SynthesisFilter | filter1
Synthesis filter for the left channel. |
| private SynthesisFilter | filter2
Sythesis filter for the right channel. |
| public static final int | ILLEGAL_SUBBAND_ALLOCATION
Illegal allocation in subband layer. |
| private boolean | |
| private LayerIDecoder | |
| private LayerIIDecoder | |
| private LayerIIIDecoder | |
| private OutputBuffer | output
The Obuffer instance that will receive the decoded PCM samples. |
| private int | |
| private int | |
| public static final int | |
| public static final int | UNSUPPORTED_LAYER
Layer not supported by the decoder. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public OutputBuffer | Returns: A SampleBuffer containing the decoded samples.The header describing the frame to decode. header, Bitstream The bistream that provides the bits for te body of the frame. stream)Decodes one frame from an MPEG audio bitstream. |
| public int | Returns: The number of output channels in the decoded samples: 1 for mono, or 2 for stereo.Retrieves the number of channels of PCM samples output by this decoder. |
| public int | |
| private void | |
| protected DecoderException | |
| protected DecoderException | |
| protected FrameDecoder | |
| public void |
| DECODER_ERROR | back to summary |
|---|---|
| public static final int DECODER_ERROR The first decoder error code. See the | |
| filter1 | back to summary |
|---|---|
| private SynthesisFilter filter1 Synthesis filter for the left channel. | |
| filter2 | back to summary |
|---|---|
| private SynthesisFilter filter2 Sythesis filter for the right channel. | |
| ILLEGAL_SUBBAND_ALLOCATION | back to summary |
|---|---|
| public static final int ILLEGAL_SUBBAND_ALLOCATION Illegal allocation in subband layer. Indicates a corrupt stream. | |
| initialized | back to summary |
|---|---|
| private boolean initialized | |
| l1decoder | back to summary |
|---|---|
| private LayerIDecoder l1decoder | |
| l2decoder | back to summary |
|---|---|
| private LayerIIDecoder l2decoder | |
| l3decoder | back to summary |
|---|---|
| private LayerIIIDecoder l3decoder | |
| output | back to summary |
|---|---|
| private OutputBuffer output The Obuffer instance that will receive the decoded PCM samples. | |
| outputChannels | back to summary |
|---|---|
| private int outputChannels | |
| outputFrequency | back to summary |
|---|---|
| private int outputFrequency | |
| UNKNOWN_ERROR | back to summary |
|---|---|
| public static final int UNKNOWN_ERROR | |
| UNSUPPORTED_LAYER | back to summary |
|---|---|
| public static final int UNSUPPORTED_LAYER Layer not supported by the decoder. | |
| MP3Decoder | back to summary |
|---|---|
| public MP3Decoder() Creates a new | |
| decodeFrame | back to summary |
|---|---|
| public OutputBuffer decodeFrame(Header header, Bitstream stream) throws DecoderException Decodes one frame from an MPEG audio bitstream.
| |
| getOutputChannels | back to summary |
|---|---|
| public int getOutputChannels() Retrieves the number of channels of PCM samples output by this decoder. This usually corresponds to the number of channels in the MPEG audio stream, although it may differ.
| |
| getOutputFrequency | back to summary |
|---|---|
| public int getOutputFrequency() Retrieves the sample frequency of the PCM samples output by this decoder. This typically corresponds to the sample rate encoded in the MPEG audio stream. | |
| initialize | back to summary |
|---|---|
| private void initialize(Header header) throws DecoderException | |
| newDecoderException | back to summary |
|---|---|
| protected DecoderException newDecoderException(int errorcode) | |
| newDecoderException | back to summary |
|---|---|
| protected DecoderException newDecoderException(int errorcode, Throwable throwable) | |
| retrieveDecoder | back to summary |
|---|---|
| protected FrameDecoder retrieveDecoder(Header header, Bitstream stream, int layer) throws DecoderException | |
| setOutputBuffer | back to summary |
|---|---|
| public void setOutputBuffer(OutputBuffer out) Changes the output buffer. This will take effect the next time decodeFrame() is called. | |