sound.zrs.wave
Class Wave
java.lang.Object
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)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
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