ddf.minim
Interface Recordable

All Known Implementing Classes:
AudioInput, AudioOutput, AudioPlayer, AudioSample, AudioSource, SignalSplitter

public interface Recordable

A Recordable object is one that can provide a program with floating point samples of the audio passing through it. It does this using AudioListeners. 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.

Author:
Damien Di Fede

Method Summary
 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
 

Method Detail

addListener

void addListener(AudioListener listener)
Adds a listener who will be notified each time this receives or creates a new buffer of samples. If the listener has already been added, it will not be added again.

Parameters:
listener - the listener to add

removeListener

void removeListener(AudioListener listener)
Removes the listener from the list of listeners.

Parameters:
listener - the listener to remove

getFormat

javax.sound.sampled.AudioFormat getFormat()
Returns the format of this recordable audio.

Returns:
the format of the audio

type

int type()
Returns either Minim.MONO or Minim.STEREO

Returns:
Minim.MONO if this is mono, Minim.STEREO if this is stereo

bufferSize

int bufferSize()
Returns the buffer size being used by this.

Returns:
the buffer size

sampleRate

float sampleRate()
Returns the sample rate of this recordable audio.

Returns:
the sample rate of this recordable audio