Package ipsk.audio.dsp
Class FloatRandomAccessStream
- java.lang.Object
-
- ipsk.audio.dsp.FloatRandomAccessStream
-
- Direct Known Subclasses:
BufferedFloatRandomAccessStream
public class FloatRandomAccessStream extends java.lang.ObjectA random accessible audio stream in normalized float values.- Author:
- K.Jaensch, klausj@phonetik.uni-muenchen.de
-
-
Field Summary
Fields Modifier and Type Field Description protected javax.sound.sampled.AudioFormataudioFormatprotected AudioSourceaudioSourceprotected byte[]bufferprotected AudioFrameProcessorbufferProcessorprotected intframeSizeprotected RandomAccessAudioStreamraas
-
Constructor Summary
Constructors Constructor Description FloatRandomAccessStream(AudioSource audioSource)Returns a float value audio stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()intgetChannels()longgetFrameLength()intreadFrames(double[][] normBuf, int frameOffset, int frames)voidsetFramePosition(long newPos)longskipFrames(long framesToSkip)java.lang.StringtoString()
-
-
-
Field Detail
-
audioSource
protected AudioSource audioSource
-
audioFormat
protected javax.sound.sampled.AudioFormat audioFormat
-
buffer
protected byte[] buffer
-
frameSize
protected int frameSize
-
raas
protected RandomAccessAudioStream raas
-
bufferProcessor
protected AudioFrameProcessor bufferProcessor
-
-
Constructor Detail
-
FloatRandomAccessStream
public FloatRandomAccessStream(AudioSource audioSource) throws AudioFormatNotSupportedException, AudioSourceException
Returns a float value audio stream. The float values a normalized to the scale -1 from to +1.- Parameters:
audioSource- audio source stream- Throws:
AudioSourceExceptionAudioFormatNotSupportedException
-
-
Method Detail
-
close
public void close() throws AudioSourceException- Throws:
AudioSourceException
-
readFrames
public int readFrames(double[][] normBuf, int frameOffset, int frames) throws AudioSourceException- Throws:
AudioSourceException
-
setFramePosition
public void setFramePosition(long newPos) throws AudioSourceException- Throws:
AudioSourceException
-
skipFrames
public long skipFrames(long framesToSkip) throws AudioSourceException- Throws:
AudioSourceException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getFrameLength
public long getFrameLength() throws AudioSourceException- Throws:
AudioSourceException
-
getChannels
public int getChannels() throws AudioSourceException- Throws:
AudioSourceException
-
-