|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kc7bfi.jflac.FLACDecoder
public class FLACDecoder
A Java FLAC decoder.
Constructor Summary | |
---|---|
FLACDecoder(InputStream inputStream)
The constructor. |
Method Summary | |
---|---|
void |
addFrameListener(FrameListener listener)
Add a frame listener. |
void |
addPCMProcessor(PCMProcessor processor)
Add a PCM processor. |
void |
decode()
Decode the FLAC file. |
void |
decode(SeekPoint from,
SeekPoint to)
Decode the data frames between two seek points. |
ByteData |
decodeFrame(Frame frame,
ByteData pcmData)
Fill the given ByteData object with PCM data from the frame. |
void |
decodeFrames()
Decode the data frames. |
int |
getBadFrames()
|
BitInputStream |
getBitInputStream()
Return the input but stream. |
ChannelData[] |
getChannelData()
Return the ChannelData object. |
long |
getSamplesDecoded()
Get the number of samples decoded. |
StreamInfo |
getStreamInfo()
Return the parsed StreamInfo Metadata record. |
long |
getTotalBytesRead()
Bytes read. |
boolean |
isEOF()
|
void |
readFrame()
Read the next data frame. |
Metadata[] |
readMetadata()
Read an array of metadata blocks. |
Metadata[] |
readMetadata(StreamInfo streamInfo)
Read an array of metadata blocks. |
Frame |
readNextFrame()
Read the next data frame. |
Metadata |
readNextMetadata()
Read a single metadata record. |
StreamInfo |
readStreamInfo()
Read the FLAC stream info. |
void |
removeFrameListener(FrameListener listener)
Remove a frame listener. |
void |
removePCMProcessor(PCMProcessor processor)
Remove a PCM processor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FLACDecoder(InputStream inputStream)
inputStream
- The input stream to read data fromMethod Detail |
---|
public StreamInfo getStreamInfo()
public ChannelData[] getChannelData()
public BitInputStream getBitInputStream()
public void addFrameListener(FrameListener listener)
listener
- The frame listener to addpublic void removeFrameListener(FrameListener listener)
listener
- The frame listener to removepublic void addPCMProcessor(PCMProcessor processor)
processor
- The processor listener to addpublic void removePCMProcessor(PCMProcessor processor)
processor
- The processor listener to removepublic ByteData decodeFrame(Frame frame, ByteData pcmData)
frame
- the frame to send to the PCM processorspcmData
- the byte data to be filled, or null if it should be allocated
space
)public StreamInfo readStreamInfo() throws IOException
IOException
- On read errorpublic Metadata[] readMetadata() throws IOException
IOException
- On read errorpublic Metadata[] readMetadata(StreamInfo streamInfo) throws IOException
streamInfo
- The StreamInfo metadata block previously read
IOException
- On read errorpublic void decode() throws IOException
IOException
- On read errorpublic void decodeFrames() throws IOException
IOException
- On read errorpublic void decode(SeekPoint from, SeekPoint to) throws IOException
from
- The starting seek pointto
- The ending seek point (non-inclusive)
IOException
- On read errorpublic Frame readNextFrame() throws IOException
IOException
- on read errorpublic long getTotalBytesRead()
public Metadata readNextMetadata() throws IOException
IOException
- on read errorpublic void readFrame() throws IOException, FrameDecodeException
IOException
- On read error
FrameDecodeException
- On frame decoding errorpublic long getSamplesDecoded()
public int getBadFrames()
public boolean isEOF()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |