javazoom.jl.decoder
Class Decoder
java.lang.Object
|
+--javazoom.jl.decoder.Decoder
- public class Decoder
- extends java.lang.Object
- implements DecoderErrors
The Decoder
class encapsulates the details of
decoding an MPEG audio frame.
- Since:
- 0.0.5
Inner Class Summary |
static class |
Decoder.Params
The Params class presents the customizable
aspects of the decoder.
|
Constructor Summary |
Decoder()
Creates a new Decoder instance with default
parameters. |
Decoder(Decoder.Params params0)
Creates a new Decoder instance with default
parameters. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Decoder
public Decoder()
- Creates a new
Decoder
instance with default
parameters.
Decoder
public Decoder(Decoder.Params params0)
- Creates a new
Decoder
instance with default
parameters.
- Parameters:
params
- The Params
instance that describes
the customizable aspects of the decoder.
getDefaultParams
public static Decoder.Params getDefaultParams()
decodeFrame
public Obuffer decodeFrame(Header header,
Bitstream stream)
throws DecoderException
- Decodes one frame from an MPEG audio bitstream.
- Parameters:
header
- The header describing the frame to decode.bitstream
- The bistream that provides the bits for te body of the frame.- Returns:
- A SampleBuffer containing the decoded samples.
setOutputBuffer
public void setOutputBuffer(Obuffer out)
- Changes the output buffer. This will take effect the next time
decodeFrame() is called.
newDecoderException
protected DecoderException newDecoderException(int errorcode)
newDecoderException
protected DecoderException newDecoderException(int errorcode,
java.lang.Throwable throwable)
retrieveDecoder
protected FrameDecoder retrieveDecoder(Header header,
Bitstream stream,
int layer)
throws DecoderException