lameonj.decoder.std
Interface StreamDecoder

All Superinterfaces:
Decoder

public interface StreamDecoder
extends Decoder

This interface may be used to decode the specified source file or stream to MP3 with only one call or progressively by chunks.

A decoding process must start decoding MP3 headers, the method decodeHeaders() must be called first.

See Also:
LAMEOnJStdDecoder.createStreamDecoder(String), LAMEOnJStdDecoder.createStreamDecoder(InputStream)

Method Summary
 void decode(java.io.OutputStream wavStream)
          Decodes the MP3 input source to WAV saving to the specified stream.
 void decode(java.lang.String wavFile)
          Decodes the MP3 input source to WAV saving to the specified file.
 PCMFrame decodeFrame()
          Decodes source MP3 data to build one PCM frame.
 mp3data_struct decodeHeaders()
          Decodes source MP3 data until MP3 header info is obtained.
 java.io.InputStream getSourceInputStream()
          Returns the input stream used to decode.
 
Methods inherited from interface lameonj.decoder.std.Decoder
close, fixWAVHeader, getMP3DataStruct, getPCMDataSize, isClosed, isMP3HeaderComplete, writeDecodedFrame, writeWAVHeader
 

Method Detail

getSourceInputStream

java.io.InputStream getSourceInputStream()
Returns the input stream used to decode.

Returns:
the input stream.

decodeHeaders

mp3data_struct decodeHeaders()
Decodes source MP3 data until MP3 header info is obtained.

Returns:
the MP3 header object.

decodeFrame

PCMFrame decodeFrame()
Decodes source MP3 data to build one PCM frame.

Returns:
a PCM frame object. Null if there is no more MP3 data.

decode

void decode(java.lang.String wavFile)
Decodes the MP3 input source to WAV saving to the specified file.

The decoder task is automatically closed.

Parameters:
wavFile - the WAV file path.

decode

void decode(java.io.OutputStream wavStream)
Decodes the MP3 input source to WAV saving to the specified stream.

The decoder task is automatically closed.

Parameters:
wavStream - the WAV output stream.


Copyright © 2006-2008 Jose Maria Arranz. All Rights Reserved.