org.thenesis.midpath.sound.codec
Class OggVorbisDecoder
java.lang.Object
org.thenesis.midpath.sound.codec.OggVorbisDecoder
- All Implemented Interfaces:
- AudioDecoder
public class OggVorbisDecoder
- extends java.lang.Object
- implements AudioDecoder
Takes a vorbis bitstream from an input stream and writes raw stereo PCM to
an output stream. Decodes simple and chained OggVorbis files from beginning
to end.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
STOPPED
public static final int STOPPED
- See Also:
- Constant Field Values
PREPARED
public static final int PREPARED
- See Also:
- Constant Field Values
DECODING
public static final int DECODING
- See Also:
- Constant Field Values
CLOSED
public static final int CLOSED
- See Also:
- Constant Field Values
OggVorbisDecoder
public OggVorbisDecoder()
initialize
public void initialize(java.io.InputStream is)
throws java.io.IOException
- Initialize decoder
- Specified by:
initialize in interface AudioDecoder
- Throws:
java.io.IOException
IllegalDecoderStateException
decodeStep
public int decodeStep(DecoderCallback callback)
throws java.io.IOException
- Decodes stream and write resulting PCM audio data to the given output stream.
- Specified by:
decodeStep in interface AudioDecoder
- Throws:
java.io.IOException
IllegalDecoderStateException
close
public void close()
pause
public void pause()
resume
public void resume()
getComments
public java.lang.String[] getComments()
getUserComments
public java.lang.String[] getUserComments()
getVendor
public java.lang.String getVendor()
getChannels
public int getChannels()
getSampleRate
public int getSampleRate()
getOutputAudioFormat
public AudioFormat getOutputAudioFormat()
- Specified by:
getOutputAudioFormat in interface AudioDecoder