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 double
getGainRatio(double gainRatio)
float
getVolume()
boolean
isLimit()
int
read(double[][] normBuf, int frameOffset, int frames)
int
read(float[][] normBuf, int frameOffset, int frames)
void
setGainRatio(double volume)
void
setLimit(boolean limit)
void
setVolume(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:
read
in classFloatAudioInputStream
- Throws:
java.io.IOException
-
read
public int read(double[][] normBuf, int frameOffset, int frames) throws java.io.IOException
- Specified by:
read
in interfaceInterleavedFloatStream
- Overrides:
read
in 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)
-
-