public interface AudioListener
AudioListener can be used to monitor Recordable
objects. Each time a Recordable object receives a new sample buffer
from the audio system, or generates a new sample buffer at the request of the
audio system, it passes a copy of this buffer to its listeners. You can
implement this interface if you want to receive samples in a callback fashion,
rather than using an object's AudioBuffers to access them. You
add an AudioListener to a Recordable by calling
Recordable.addListener(AudioListener). When you want to stop
receiving samples you call Recordable.removeListener(AudioListener).| Modifier and Type | Method and Description |
|---|---|
void |
samples(float[] samp)
Called by the
Recordable object this is attached to
when that object has new samples. |
void |
samples(float[] sampL,
float[] sampR)
Called by the
Recordable object this is attached to
when that object has new samples. |
void samples(float[] samp)
Recordable object this is attached to
when that object has new samples.samp - a buffer of samples from a MONO sound streamvoid samples(float[] sampL,
float[] sampR)
Recordable object this is attached to
when that object has new samples.sampL - the left channel of a STEREO sound streamsampR - the right channel of a STEREO sound stream