org.tritonus.sampled.convert
Class AlawFormatConversionProvider.FromAlawStream
java.lang.Object
java.io.InputStream
javax.sound.sampled.AudioInputStream
org.tritonus.share.sampled.convert.TAudioInputStream
org.tritonus.share.sampled.convert.TSynchronousFilteredAudioInputStream
org.tritonus.sampled.convert.AlawFormatConversionProvider.FromAlawStream
- All Implemented Interfaces:
- Closeable
- Enclosing class:
- AlawFormatConversionProvider
- class AlawFormatConversionProvider.FromAlawStream
- extends TSynchronousFilteredAudioInputStream
Method Summary |
protected int |
convert(byte[] inBuffer,
byte[] outBuffer,
int outByteOffset,
int inFrameCount)
Override this method to do the actual conversion. |
protected void |
convertInPlace(byte[] buffer,
int byteOffset,
int frameCount)
Override this method to provide in-place conversion of samples. |
Methods inherited from class org.tritonus.share.sampled.convert.TSynchronousFilteredAudioInputStream |
available, close, enableConvertInPlace, getOriginalFormat, getOriginalStream, mark, markSupported, read, read, reset, skip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AlawFormatConversionProvider.FromAlawStream
public AlawFormatConversionProvider.FromAlawStream(AudioInputStream sourceStream,
AudioFormat targetFormat)
convert
protected int convert(byte[] inBuffer,
byte[] outBuffer,
int outByteOffset,
int inFrameCount)
- Description copied from class:
TSynchronousFilteredAudioInputStream
- Override this method to do the actual conversion.
inBuffer starts always at index 0 (it is an internal buffer)
You should always override this.
inFrameCount is the number of frames in inBuffer. These
frames are of the format originalFormat.
- Specified by:
convert
in class TSynchronousFilteredAudioInputStream
- Returns:
- the resulting number of frames converted and put into
outBuffer. The return value is in the format of this stream.
convertInPlace
protected void convertInPlace(byte[] buffer,
int byteOffset,
int frameCount)
- Description copied from class:
TSynchronousFilteredAudioInputStream
- Override this method to provide in-place conversion of samples.
To use it, call "enableConvertInPlace()". It will only be used when
input bytes per frame >= output bytes per frame.
This method must always convert frameCount frames, so no return value is necessary.
- Overrides:
convertInPlace
in class TSynchronousFilteredAudioInputStream