public class JavaSoundAudioGrabber extends AudioGrabber
listeners| Constructor and Description |
|---|
JavaSoundAudioGrabber(AudioFormat format)
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
fireAudioAvailable()
Fire the event and audio is now available
|
long |
getLength()
Returns the length of the audio stream in milliseconds.
|
boolean |
isStopped()
Whether the stream is stopped or not.
|
SampleChunk |
nextSampleChunk()
Retrieve the next SampleChunk from the audio stream.
|
void |
run()
Start the stream grabbing.
|
void |
setFormat(AudioFormat format)
Set the audio format of this audio object.
|
void |
setMaxBufferSize(int maxBufferSize)
Set the maximum size buffer to be returned.
|
void |
stop()
Stop the stream grabbing
|
addAudioGrabberListener, removeAudioGrabberListener, resetiterator, seekclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic JavaSoundAudioGrabber(AudioFormat format)
format - The format to attempt to open the sound linepublic void run()
run in interface Runnablerun in class AudioGrabberAudioGrabber.run()public void stop()
stop in class AudioGrabberAudioGrabber.stop()public boolean isStopped()
isStopped in class AudioGrabberAudioGrabber.isStopped()protected void fireAudioAvailable()
fireAudioAvailable in class AudioGrabberpublic void setFormat(AudioFormat format)
setFormat in class Audioformat - The format of the audio dataAudio.setFormat(org.openimaj.audio.AudioFormat)public SampleChunk nextSampleChunk()
nextSampleChunk in class AudioStreamAudioStream.nextSampleChunk()public void setMaxBufferSize(int maxBufferSize)
maxBufferSize - public long getLength()
getLength in class AudioStreamAudioStream.getLength()