org.kc7bfi.jflac.sound.spi
Class Flac2PcmAudioInputStream
java.lang.Object
java.io.InputStream
javax.sound.sampled.AudioInputStream
org.kc7bfi.jflac.sound.spi.RingedAudioInputStream
org.kc7bfi.jflac.sound.spi.Flac2PcmAudioInputStream
- All Implemented Interfaces:
- java.io.Closeable, PCMProcessor
public class Flac2PcmAudioInputStream
- extends RingedAudioInputStream
- implements PCMProcessor
Converts an Flac bitstream into a PCM 16bits/sample audio stream.
|
Constructor Summary |
Flac2PcmAudioInputStream(java.io.InputStream in,
javax.sound.sampled.AudioFormat format,
long length)
Constructor. |
Flac2PcmAudioInputStream(java.io.InputStream in,
javax.sound.sampled.AudioFormat format,
long length,
int size)
Constructor. |
| Methods inherited from class javax.sound.sampled.AudioInputStream |
getFormat, getFrameLength, read |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Flac2PcmAudioInputStream
public Flac2PcmAudioInputStream(java.io.InputStream in,
javax.sound.sampled.AudioFormat format,
long length)
- Constructor.
- Parameters:
in - the underlying input stream.format - the target format of this stream's audio data.length - the length in sample frames of the data in this stream.
Flac2PcmAudioInputStream
public Flac2PcmAudioInputStream(java.io.InputStream in,
javax.sound.sampled.AudioFormat format,
long length,
int size)
- Constructor.
- Parameters:
in - the underlying input stream.format - the target format of this stream's audio data.length - the length in sample frames of the data in this stream.size - the buffer size.
processStreamInfo
public void processStreamInfo(StreamInfo streamInfo)
- Process the StreamInfo block.
- Specified by:
processStreamInfo in interface PCMProcessor
- Parameters:
streamInfo - the StreamInfo block- See Also:
PCMProcessor.processStreamInfo(org.kc7bfi.jflac.metadata.StreamInfo)
processPCM
public void processPCM(ByteData pcm)
- Process the decoded PCM bytes. This is called synchronously from the
fill() method.
- Specified by:
processPCM in interface PCMProcessor
- Parameters:
pcm - The decoded PCM data- See Also:
PCMProcessor.processPCM(ByteData)
getStreamInfo
public StreamInfo getStreamInfo()
- Returns:
- the streamInfo
getMetaData
public Metadata[] getMetaData()
- Returns:
- the metaData