Package ipsk.audio.dsp
Class VolumeControlStream
- java.lang.Object
-
- ipsk.audio.dsp.FloatAudioInputStream
-
- ipsk.audio.dsp.VolumeControlStream
-
- All Implemented Interfaces:
InterleavedFloatStream
public class VolumeControlStream extends FloatAudioInputStream
- Author:
- K.Jaensch, klausj@phonetik.uni-muenchen.de
-
-
Constructor Summary
Constructors Constructor Description VolumeControlStream(javax.sound.sampled.AudioInputStream srcAudioInputStream)VolumeControlStream(javax.sound.sampled.AudioInputStream srcAudioInputStream, boolean limit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetGainRatio(double gainRatio)floatgetVolume()booleanisLimit()intread(double[][] normBuf, int frameOffset, int frames)intread(float[][] normBuf, int frameOffset, int frames)voidsetGainRatio(double volume)voidsetLimit(boolean limit)voidsetVolume(float volume)-
Methods inherited from class ipsk.audio.dsp.FloatAudioInputStream
close, getChannels, getFormat, getFrameLength, isUseReadOnSkipException, setFramePosition, setUseReadOnSkipException, skip, skipFrames, toString
-
-
-
-
Constructor Detail
-
VolumeControlStream
public VolumeControlStream(javax.sound.sampled.AudioInputStream srcAudioInputStream) throws AudioFormatNotSupportedException- Throws:
AudioFormatNotSupportedException
-
VolumeControlStream
public VolumeControlStream(javax.sound.sampled.AudioInputStream srcAudioInputStream, boolean limit) throws AudioFormatNotSupportedException- Throws:
AudioFormatNotSupportedException
-
-
Method Detail
-
read
public int read(float[][] normBuf, int frameOffset, int frames) throws java.io.IOException- Overrides:
readin classFloatAudioInputStream- Throws:
java.io.IOException
-
read
public int read(double[][] normBuf, int frameOffset, int frames) throws java.io.IOException- Specified by:
readin interfaceInterleavedFloatStream- Overrides:
readin classFloatAudioInputStream- Throws:
java.io.IOException
-
getVolume
public float getVolume()
-
setVolume
public void setVolume(float volume)
-
getGainRatio
public double getGainRatio(double gainRatio)
-
setGainRatio
public void setGainRatio(double volume)
-
isLimit
public boolean isLimit()
-
setLimit
public void setLimit(boolean limit)
-
-