Package ipsk.audio.dsp
Class BufferedFloatRandomAccessStream
- java.lang.Object
-
- ipsk.audio.dsp.FloatRandomAccessStream
-
- ipsk.audio.dsp.BufferedFloatRandomAccessStream
-
public class BufferedFloatRandomAccessStream extends FloatRandomAccessStream
A random accessible audio stream in normalized float values.- Author:
- K.Jaensch, klausj@phonetik.uni-muenchen.de
-
-
Field Summary
-
Fields inherited from class ipsk.audio.dsp.FloatRandomAccessStream
audioFormat, audioSource, buffer, bufferProcessor, frameSize, raas
-
-
Constructor Summary
Constructors Constructor Description BufferedFloatRandomAccessStream(AudioSource audioSource)
Returns a float value audio stream.BufferedFloatRandomAccessStream(AudioSource audioSource, int maxCacheSize)
Returns a float value audio stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
int
getChannels()
long
getFrameLength()
int
readFrames(double[][] normBuf, int frameOffset, int frames)
void
setFramePosition(long newPos)
long
skipFrames(long framesToSkip)
java.lang.String
toString()
-
-
-
Constructor Detail
-
BufferedFloatRandomAccessStream
public BufferedFloatRandomAccessStream(AudioSource audioSource) throws AudioFormatNotSupportedException, AudioSourceException
Returns a float value audio stream. The float values a normalized to the scale -1 from to +1.
-
BufferedFloatRandomAccessStream
public BufferedFloatRandomAccessStream(AudioSource audioSource, int maxCacheSize) throws AudioFormatNotSupportedException, AudioSourceException
Returns a float value audio stream. The float values a normalized to the scale -1 from to +1.- Parameters:
audioSource
- audio sourcemaxCacheSize
- maximum cache size in bytes- Throws:
AudioFormatNotSupportedException
AudioSourceException
-
-
Method Detail
-
close
public void close() throws AudioSourceException
- Overrides:
close
in classFloatRandomAccessStream
- Throws:
AudioSourceException
-
readFrames
public int readFrames(double[][] normBuf, int frameOffset, int frames) throws AudioSourceException
- Overrides:
readFrames
in classFloatRandomAccessStream
- Throws:
AudioSourceException
-
setFramePosition
public void setFramePosition(long newPos) throws AudioSourceException
- Overrides:
setFramePosition
in classFloatRandomAccessStream
- Throws:
AudioSourceException
-
skipFrames
public long skipFrames(long framesToSkip) throws AudioSourceException
- Overrides:
skipFrames
in classFloatRandomAccessStream
- Throws:
AudioSourceException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classFloatRandomAccessStream
-
getFrameLength
public long getFrameLength() throws AudioSourceException
- Overrides:
getFrameLength
in classFloatRandomAccessStream
- Throws:
AudioSourceException
-
getChannels
public int getChannels() throws AudioSourceException
- Overrides:
getChannels
in classFloatRandomAccessStream
- Throws:
AudioSourceException
-
-