public interface Recordable
Recordable
object is one that can provide a program with
floating point samples of the audio passing through it. It does this using
AudioListener
s. You add listeners to the Recordable
and
then the Recordable
will call the appropriate samples
method of all its listeners when it has a new buffer of samples. It is also
possible to query a Recordable
object for its buffer size, type
(mono or stereo), and audio format.Modifier and Type | Method and Description |
---|---|
void |
addListener(AudioListener listener)
Adds a listener who will be notified each time this receives
or creates a new buffer of samples.
|
int |
bufferSize()
Returns the buffer size being used by this.
|
javax.sound.sampled.AudioFormat |
getFormat()
Returns the format of this recordable audio.
|
void |
removeListener(AudioListener listener)
Removes the listener from the list of listeners.
|
float |
sampleRate()
Returns the sample rate of this recordable audio.
|
int |
type()
Returns either Minim.MONO or Minim.STEREO
|
void addListener(AudioListener listener)
listener
- the listener to addvoid removeListener(AudioListener listener)
listener
- the listener to removejavax.sound.sampled.AudioFormat getFormat()
int type()
int bufferSize()
float sampleRate()