org.tritonus.sampled.convert
Class ImaAdpcmFormatConversionProvider.EncodedImaAdpcmAudioInputStream

java.lang.Object
  extended byjava.io.InputStream
      extended byjavax.sound.sampled.AudioInputStream
          extended byorg.tritonus.share.sampled.convert.TAudioInputStream
              extended byorg.tritonus.share.sampled.convert.TSynchronousFilteredAudioInputStream
                  extended byorg.tritonus.sampled.convert.ImaAdpcmFormatConversionProvider.EncodedImaAdpcmAudioInputStream
All Implemented Interfaces:
Closeable
Enclosing class:
ImaAdpcmFormatConversionProvider

public static class ImaAdpcmFormatConversionProvider.EncodedImaAdpcmAudioInputStream
extends TSynchronousFilteredAudioInputStream

AudioInputStream returned on encoding to IMA ADPCM. An instance of this class is returned if you call AudioSystem.getAudioInputStream(AudioFormat, AudioInputStream) to encode to a IMA ADPCM stream.


Field Summary
 
Fields inherited from class org.tritonus.share.sampled.convert.TSynchronousFilteredAudioInputStream
buffer
 
Fields inherited from class javax.sound.sampled.AudioInputStream
format, frameLength, framePos, frameSize, stream
 
Constructor Summary
ImaAdpcmFormatConversionProvider.EncodedImaAdpcmAudioInputStream(AudioInputStream decodedStream, AudioFormat outputFormat)
          Constructor.
 
Method Summary
protected  int convert(byte[] inBuffer, byte[] outBuffer, int outByteOffset, int inFrameCount)
          Override this method to do the actual conversion.
 
Methods inherited from class org.tritonus.share.sampled.convert.TSynchronousFilteredAudioInputStream
available, close, convertInPlace, enableConvertInPlace, getOriginalFormat, getOriginalStream, mark, markSupported, read, read, reset, skip
 
Methods inherited from class org.tritonus.share.sampled.convert.TAudioInputStream
properties, setProperty
 
Methods inherited from class javax.sound.sampled.AudioInputStream
getFormat, getFrameLength, read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImaAdpcmFormatConversionProvider.EncodedImaAdpcmAudioInputStream

public ImaAdpcmFormatConversionProvider.EncodedImaAdpcmAudioInputStream(AudioInputStream decodedStream,
                                                                        AudioFormat outputFormat)
Constructor.

Method Detail

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.