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.AudioInputStream
audioInputStream
protected AudioSource
audioSource
static boolean
DEBUG
protected long
framePos
protected int
frameSize
-
Constructor Summary
Constructors Constructor Description RandomAccessAudioStream(AudioSource audioSource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
long
getFrameLength()
long
getPosition()
int
readFrames(byte[] buf, int offset, int len)
int
readFrames(long pos, byte[] buf, int offset, int len)
void
setPosition(long pos)
long
skipFrames(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
-
-