Package ipsk.audio.dsp
Class FloatAudioInputStream
- java.lang.Object
-
- ipsk.audio.dsp.FloatAudioInputStream
-
- All Implemented Interfaces:
InterleavedFloatStream
- Direct Known Subclasses:
VolumeControlStream
public class FloatAudioInputStream extends java.lang.Object implements InterleavedFloatStream
- Author:
- K.Jaensch, klausj@phonetik.uni-muenchen.de
-
-
Constructor Summary
Constructors Constructor Description FloatAudioInputStream(javax.sound.sampled.AudioInputStream srcAudioInputStream)
Returns a float value audio stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
java.lang.Integer
getChannels()
javax.sound.sampled.AudioFormat
getFormat()
long
getFrameLength()
boolean
isUseReadOnSkipException()
int
read(double[][] normBuf, int frameOffset, int frames)
int
read(float[][] normBuf, int frameOffset, int frames)
void
setFramePosition(long newPos)
void
setUseReadOnSkipException(boolean useReadOnSkipException)
long
skip(long skip)
long
skipFrames(long arg0)
java.lang.String
toString()
-
-
-
Constructor Detail
-
FloatAudioInputStream
public FloatAudioInputStream(javax.sound.sampled.AudioInputStream srcAudioInputStream) throws AudioFormatNotSupportedException
Returns a float value audio stream. The float values a normalized to the scale -1 from to +1.- Parameters:
srcAudioInputStream
- source audio stream- Throws:
AudioFormatNotSupportedException
-
-
Method Detail
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfaceInterleavedFloatStream
- Throws:
java.io.IOException
-
getFormat
public javax.sound.sampled.AudioFormat getFormat()
-
getFrameLength
public long getFrameLength()
-
read
public int read(double[][] normBuf, int frameOffset, int frames) throws java.io.IOException
- Specified by:
read
in interfaceInterleavedFloatStream
- Throws:
java.io.IOException
-
read
public int read(float[][] normBuf, int frameOffset, int frames) throws java.io.IOException
- Throws:
java.io.IOException
-
setFramePosition
public void setFramePosition(long newPos) throws java.io.IOException
- Throws:
java.io.IOException
-
skip
public long skip(long skip) throws java.io.IOException
- Specified by:
skip
in interfaceInterleavedFloatStream
- Throws:
java.io.IOException
-
skipFrames
public long skipFrames(long arg0) throws java.io.IOException
- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
isUseReadOnSkipException
public boolean isUseReadOnSkipException()
-
setUseReadOnSkipException
public void setUseReadOnSkipException(boolean useReadOnSkipException)
-
getChannels
public java.lang.Integer getChannels()
- Specified by:
getChannels
in interfaceInterleavedFloatStream
-
-