Package ipsk.audio.dsp
Class FloatToPCMInputStream
- java.lang.Object
-
- java.io.InputStream
-
- ipsk.io.FramedInputStream
-
- ipsk.audio.dsp.FloatToPCMInputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class FloatToPCMInputStream extends FramedInputStream
Converts a float audio input stream to PCM signed encoded audio stream.- Author:
- K.Jaensch, klausj@phonetik.uni-muenchen.de
-
-
Field Summary
-
Fields inherited from class ipsk.io.FramedInputStream
frameSizeException
-
-
Constructor Summary
Constructors Constructor Description FloatToPCMInputStream(FloatAudioInputStream audioInStream)
Create new PCM stream.FloatToPCMInputStream(InterleavedFloatStream inStream, javax.sound.sampled.AudioFormat pcmFormat)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
read(byte[] buf, int offset, int length)
-
Methods inherited from class ipsk.io.FramedInputStream
read, read
-
-
-
-
Constructor Detail
-
FloatToPCMInputStream
public FloatToPCMInputStream(FloatAudioInputStream audioInStream) throws AudioFormatNotSupportedException
Create new PCM stream.- Parameters:
audioInStream
- the source float stream- Throws:
AudioFormatNotSupportedException
-
FloatToPCMInputStream
public FloatToPCMInputStream(InterleavedFloatStream inStream, javax.sound.sampled.AudioFormat pcmFormat) throws AudioFormatNotSupportedException
- Parameters:
inStream
- raw interleaved float streampcmFormat
- the PCM audio format to convert to- Throws:
AudioFormatNotSupportedException
-
-
Method Detail
-
read
public int read(byte[] buf, int offset, int length) throws java.io.IOException
- Specified by:
read
in classFramedInputStream
- Throws:
java.io.IOException
-
-