org.tritonus.share.sampled.convert
Class TAsynchronousFilteredAudioInputStream
java.lang.Object
java.io.InputStream
javax.sound.sampled.AudioInputStream
org.tritonus.share.sampled.convert.TAudioInputStream
org.tritonus.share.sampled.convert.TAsynchronousFilteredAudioInputStream
- All Implemented Interfaces:
- java.io.Closeable, TCircularBuffer.Trigger
- Direct Known Subclasses:
- GSMFormatConversionProvider.DecodedGSMAudioInputStream, GSMFormatConversionProvider.EncodedGSMAudioInputStream, JorbisFormatConversionProvider.DecodedJorbisAudioInputStream, VorbisFormatConversionProvider.DecodedVorbisAudioInputStream, VorbisFormatConversionProvider.DecodedVorbisAudioInputStream, VorbisFormatConversionProvider.EncodedVorbisAudioInputStream, VorbisFormatConversionProvider.EncodedVorbisAudioInputStream
public abstract class TAsynchronousFilteredAudioInputStream
- extends TAudioInputStream
- implements TCircularBuffer.Trigger
Base class for asynchronus converters.
This class serves as base class for
converters that do not have a fixed
ratio between the size of a block of input
data and the size of a block of output data.
These types of converters therefore need an
internal buffer, which is realized in this
class.
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TAsynchronousFilteredAudioInputStream
public TAsynchronousFilteredAudioInputStream(AudioFormat outputFormat,
long lLength)
- Constructor.
This constructor uses the default buffer size and the default
min available amount.
- Parameters:
lLength
- length of this stream in frames. May be
AudioSystem.NOT_SPECIFIED.
TAsynchronousFilteredAudioInputStream
public TAsynchronousFilteredAudioInputStream(AudioFormat outputFormat,
long lLength,
int nBufferSize,
int nMinAvailable)
- Constructor.
With this constructor, the buffer size and the minimum
available amount can be specified as parameters.
- Parameters:
lLength
- length of this stream in frames. May be
AudioSystem.NOT_SPECIFIED.nBufferSize
- size of the circular buffer in bytes.
read
public int read()
throws java.io.IOException
- Overrides:
read
in class AudioInputStream
- Throws:
java.io.IOException
read
public int read(byte[] abData)
throws java.io.IOException
- Overrides:
read
in class AudioInputStream
- Throws:
java.io.IOException
read
public int read(byte[] abData,
int nOffset,
int nLength)
throws java.io.IOException
- Overrides:
read
in class AudioInputStream
- Throws:
java.io.IOException
skip
public long skip(long lSkip)
throws java.io.IOException
- Overrides:
skip
in class AudioInputStream
- Throws:
java.io.IOException
available
public int available()
throws java.io.IOException
- Overrides:
available
in class AudioInputStream
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Specified by:
close
in interface java.io.Closeable
- Overrides:
close
in class AudioInputStream
- Throws:
java.io.IOException
markSupported
public boolean markSupported()
- Overrides:
markSupported
in class AudioInputStream
mark
public void mark(int nReadLimit)
- Overrides:
mark
in class AudioInputStream
reset
public void reset()
throws java.io.IOException
- Overrides:
reset
in class AudioInputStream
- Throws:
java.io.IOException