public class AudioLooper extends AudioStream
Constructor and Description |
---|
AudioLooper(AudioStream stream,
int nLoops)
Create a new looper that will loop the given stream the given number
of times.
|
AudioLooper(AudioStream stream,
int nLoops,
boolean cacheStream)
Create a new looper that will loop the given stream the given number
of times.
|
Modifier and Type | Method and Description |
---|---|
long |
getLength()
Returns the length of the audio stream in milliseconds.
|
SampleChunk |
nextSampleChunk()
Retrieve the next SampleChunk from the audio stream.
|
void |
reset()
Reset the audio stream.
|
iterator, seek
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public AudioLooper(AudioStream stream, int nLoops)
stream
- The stream to loopnLoops
- The number of times to loop the streampublic AudioLooper(AudioStream stream, int nLoops, boolean cacheStream)
stream
- The stream to loopnLoops
- The number of loops to docacheStream
- Whether to cache the stream or notpublic SampleChunk nextSampleChunk()
nextSampleChunk
in class AudioStream
AudioStream.nextSampleChunk()
public void reset()
reset
in class AudioStream
AudioStream.reset()
public long getLength()
getLength
in class AudioStream
AudioStream.getLength()