Package ipsk.audio
Class RandomAccessAudioStream
- java.lang.Object
-
- ipsk.audio.RandomAccessAudioStream
-
public class RandomAccessAudioStream extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected javax.sound.sampled.AudioInputStreamaudioInputStreamprotected AudioSourceaudioSourcestatic booleanDEBUGprotected longframePosprotected intframeSize
-
Constructor Summary
Constructors Constructor Description RandomAccessAudioStream(AudioSource audioSource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()longgetFrameLength()longgetPosition()intreadFrames(byte[] buf, int offset, int len)intreadFrames(long pos, byte[] buf, int offset, int len)voidsetPosition(long pos)longskipFrames(long framesToSkip)
-
-
-
Field Detail
-
DEBUG
public static final boolean DEBUG
- See Also:
- Constant Field Values
-
audioSource
protected AudioSource audioSource
-
audioInputStream
protected javax.sound.sampled.AudioInputStream audioInputStream
-
framePos
protected long framePos
-
frameSize
protected int frameSize
-
-
Constructor Detail
-
RandomAccessAudioStream
public RandomAccessAudioStream(AudioSource audioSource)
-
-
Method Detail
-
readFrames
public int readFrames(byte[] buf, int offset, int len) throws AudioSourceException- Throws:
AudioSourceException
-
readFrames
public int readFrames(long pos, byte[] buf, int offset, int len) throws AudioSourceException- Throws:
AudioSourceException
-
getPosition
public long getPosition()
-
setPosition
public void setPosition(long pos) throws AudioSourceException- Throws:
AudioSourceException
-
skipFrames
public long skipFrames(long framesToSkip) throws AudioSourceException- Throws:
AudioSourceException
-
close
public void close() throws AudioSourceException- Throws:
AudioSourceException
-
getFrameLength
public long getFrameLength() throws AudioSourceException- Throws:
AudioSourceException
-
-