Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.anotherbigidea.flash.sound
Class ADPCMEncodeStream  view ADPCMEncodeStream download ADPCMEncodeStream.java

java.lang.Object
  extended bycom.anotherbigidea.flash.sound.ADPCMEncodeStream
All Implemented Interfaces:
ADPCMConstants

public class ADPCMEncodeStream
extends java.lang.Object
implements ADPCMConstants

ADPCM Encoder


Field Summary
protected  int index
           
protected  boolean is16bit
           
protected  boolean isDone
           
protected  boolean isSigned
           
protected  java.io.InputStream samplesIn
           
protected  java.util.ArrayList sampleStack
           
protected  int valpred
           
 
Fields inherited from interface com.anotherbigidea.flash.sound.ADPCMConstants
indexTable, PACKET_SIZE, stepsizeTable
 
Constructor Summary
ADPCMEncodeStream(java.io.InputStream inputSamples, boolean is16bit, boolean isSigned)
           
 
Method Summary
 int getDelta()
          Get the next ADPCM delta
 int getFirstPacketSample()
           
 int getIndex()
           
 int getSample()
           
 boolean isDone()
           
 int peekSample()
           
 void pushSample(int sample)
           
protected  int read()
           
 int setIndex(int sample1)
          Set the index, given sample 1, to the closest value that gives the delta with the next sample
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

samplesIn

protected java.io.InputStream samplesIn

is16bit

protected boolean is16bit

isDone

protected boolean isDone

isSigned

protected boolean isSigned

sampleStack

protected java.util.ArrayList sampleStack

valpred

protected int valpred

index

protected int index
Constructor Detail

ADPCMEncodeStream

public ADPCMEncodeStream(java.io.InputStream inputSamples,
                         boolean is16bit,
                         boolean isSigned)
Method Detail

isDone

public boolean isDone()

getIndex

public int getIndex()

getDelta

public int getDelta()
             throws java.io.IOException
Get the next ADPCM delta


getSample

public int getSample()
              throws java.io.IOException

read

protected int read()
            throws java.io.IOException

pushSample

public void pushSample(int sample)

getFirstPacketSample

public int getFirstPacketSample()
                         throws java.io.IOException

peekSample

public int peekSample()
               throws java.io.IOException

setIndex

public int setIndex(int sample1)
             throws java.io.IOException
Set the index, given sample 1, to the closest value that gives the delta with the next sample