| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface GenericDecoder
This interface may be used to progressively decode MP3 data to PCM.
A decoding process must start decoding MP3 headers, the method
 decodeHeaders(byte[],int) must be called until it returns a non-null
 MP3 header object.
 
LAMEOnJStdDecoder.createGenericDecoder()| Method Summary | |
|---|---|
|  PCMFrame | decodeFrame(byte[] mp3buf,
            int size)Decodes the specified MP3 data to build one PCM frame. | 
|  mp3data_struct | decodeHeaders(byte[] mp3buf,
              int size)Process the specified MP3 data containing MP3 header info. | 
|  PCMFrame | decodePendingFrame()Decodes any pending (not processed) MP3 data to build one PCM frame. | 
| Methods inherited from interface lameonj.decoder.std.Decoder | 
|---|
| close, fixWAVHeader, getMP3DataStruct, getPCMDataSize, isClosed, isMP3HeaderComplete, writeDecodedFrame, writeWAVHeader | 
| Method Detail | 
|---|
mp3data_struct decodeHeaders(byte[] mp3buf,
                             int size)
If this method returns null, specified MP3 data is not enough to extract header info. Call again until returns a non-null object.
Submitted MP3 data can contain several MP3 frames, not processed
 data is queued internally and used later. Call decodePendingFrame()
 to process pending MP3 frames to avoid excessive memory consumption.
 
mp3buf - buffer containing MP3 data to decode.size - the number of bytes of the MP3 buffer to process.
PCMFrame decodeFrame(byte[] mp3buf,
                     int size)
Any internal MP3 data pending to process is used first to build the PCM frame.
If submitted MP3 data is not enough returns null. Call again providing new data.
Submitted MP3 data can contain several MP3 frames, not processed
 data is queued internally and used later. Before calling
 this method, call decodePendingFrame()
 to process pending MP3 frames to avoid excessive memory consumption.
 
mp3buf - buffer containing MP3 data to decode.size - the number of bytes of the MP3 buffer to process.
PCMFrame decodePendingFrame()
If pending MP3 data is not enough to build a PCM frame returns null.
Before submitting new MP3 data to the decoder call this method several times until returns null to avoid excessive memory consumption.
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||