sound.zrs.wave
Class Wave

java.lang.Object
  extended by sound.zrs.wave.Wave
All Implemented Interfaces:
java.lang.Cloneable

public class Wave
extends java.lang.Object
implements java.lang.Cloneable


Constructor Summary
Wave()
           
Wave(double[] wave, int samplingRate)
           
Wave(double[] wave, int samplingRate, double maxAmplitude)
           
Wave(java.io.InputStream i)
           
Wave(java.lang.String filename)
           
 
Method Summary
 java.lang.Object clone()
           
 double getMaxAmplitude()
           
 int getSamplingRate()
           
 Wave getSection(int start, int end)
           
 byte[] getUlaw()
           
 double[] getWave()
           
 int length()
           
 void read(java.io.InputStream is)
           
 void setMaxAmplitude(double maxAmplitude)
           
 void setSamplingRate(int samplingRate)
           
 void setWave(double[] wave)
           
 void write(java.io.OutputStream os)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Wave

public Wave()

Wave

public Wave(double[] wave,
            int samplingRate,
            double maxAmplitude)

Wave

public Wave(double[] wave,
            int samplingRate)

Wave

public Wave(java.io.InputStream i)
     throws java.io.IOException,
            WaveFormatException
Throws:
java.io.IOException
WaveFormatException

Wave

public Wave(java.lang.String filename)
     throws java.io.IOException,
            WaveFormatException
Throws:
java.io.IOException
WaveFormatException
Method Detail

getWave

public double[] getWave()

getSamplingRate

public int getSamplingRate()

getMaxAmplitude

public double getMaxAmplitude()

setWave

public void setWave(double[] wave)

setSamplingRate

public void setSamplingRate(int samplingRate)

setMaxAmplitude

public void setMaxAmplitude(double maxAmplitude)

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

getSection

public Wave getSection(int start,
                       int end)

length

public int length()

getUlaw

public byte[] getUlaw()

write

public void write(java.io.OutputStream os)
           throws java.io.IOException
Throws:
java.io.IOException

read

public void read(java.io.InputStream is)
          throws java.io.IOException,
                 WaveFormatException
Throws:
java.io.IOException
WaveFormatException