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 voidclose()intgetChannels()longgetFrameLength()intreadFrames(double[][] normBuf, int frameOffset, int frames)voidsetFramePosition(long newPos)longskipFrames(long framesToSkip)java.lang.StringtoString()
-
-
-
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:
AudioFormatNotSupportedExceptionAudioSourceException
-
-
Method Detail
-
close
public void close() throws AudioSourceException- Overrides:
closein classFloatRandomAccessStream- Throws:
AudioSourceException
-
readFrames
public int readFrames(double[][] normBuf, int frameOffset, int frames) throws AudioSourceException- Overrides:
readFramesin classFloatRandomAccessStream- Throws:
AudioSourceException
-
setFramePosition
public void setFramePosition(long newPos) throws AudioSourceException- Overrides:
setFramePositionin classFloatRandomAccessStream- Throws:
AudioSourceException
-
skipFrames
public long skipFrames(long framesToSkip) throws AudioSourceException- Overrides:
skipFramesin classFloatRandomAccessStream- Throws:
AudioSourceException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classFloatRandomAccessStream
-
getFrameLength
public long getFrameLength() throws AudioSourceException- Overrides:
getFrameLengthin classFloatRandomAccessStream- Throws:
AudioSourceException
-
getChannels
public int getChannels() throws AudioSourceException- Overrides:
getChannelsin classFloatRandomAccessStream- Throws:
AudioSourceException
-
-