public abstract class AudioGrabber extends AudioStream implements Runnable
AudioStream
abstract class. Obviously, if using
an audio grabber in the context of an audio stream (for processing or
whatever), it cannot be guaranteed that the audio grabber will buffer
sampled between calls of AudioStream.nextSampleChunk()
.Modifier and Type | Field and Description |
---|---|
protected List<AudioGrabberListener> |
listeners
A list of listeners for samples
|
Constructor and Description |
---|
AudioGrabber() |
Modifier and Type | Method and Description |
---|---|
void |
addAudioGrabberListener(AudioGrabberListener l)
Add an audio grabber listener to this audio grabber.
|
protected abstract void |
fireAudioAvailable()
Fire the event and audio is now available
|
abstract boolean |
isStopped()
Whether the stream is stopped or not.
|
void |
removeAudioGrabberListener(AudioGrabberListener l)
Remove an audio grabber listener from this audio grabber.
|
void |
reset()
Does nothing by default for an audio grabber.
|
abstract void |
run()
Start the stream grabbing.
|
abstract void |
stop()
Stop the stream grabbing
|
getLength, iterator, nextSampleChunk, seek
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
protected List<AudioGrabberListener> listeners
public AudioGrabber()
public abstract void run()
run
in interface Runnable
Runnable.run()
public abstract void stop()
public abstract boolean isStopped()
protected abstract void fireAudioAvailable()
public void addAudioGrabberListener(AudioGrabberListener l)
l
- The listener to add.public void removeAudioGrabberListener(AudioGrabberListener l)
l
- The audio grabber listener to remove.public void reset()
reset
in class AudioStream
AudioStream.reset()