ddf.minim
Interface Effectable

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

public interface Effectable

An Effectable object is simply one that can have AudioEffects attached to it. As with an audio track in a typical DAW, you can enable and disable the effects on an Effectable without having to remove them from the object.

Author:
Damien Di Fede

Method Summary
 void addEffect(AudioEffect effect)
          Adds an effect to the effects chain.
 void clearEffects()
          Removes all effects from the effect chain.
 void disableEffect(AudioEffect effect)
          Disables effect if it is in the chain.
 void disableEffect(int i)
          disables the ith effect in the effect chain.
 int effectCount()
          Returns the number of effects in the chain.
 void effects()
          Enables all effects currently attached to this.
 void enableEffect(AudioEffect effect)
          Enables effect if it is in the chain.
 void enableEffect(int i)
          Enables the ith effect in the effect chain.
 AudioEffect getEffect(int i)
          Returns the ith effect in the effect chain.
 boolean hasEffect(AudioEffect effect)
          Returns true if effect is in the chain.
 boolean isEffected()
          Returns true if at least one effect in the chain is enabled.
 boolean isEnabled(AudioEffect effect)
          Returns true if effect is in the chain and is also enabled.
 void noEffects()
          Disables all effects currently attached to this.
 void removeEffect(AudioEffect effect)
          Removes effect from the effects chain.
 AudioEffect removeEffect(int i)
          Removes and returns the ith effect in the effect chain.
 

Method Detail

effects

void effects()
Enables all effects currently attached to this. If you want to enable only a single effect, use enableEffect(int).


noEffects

void noEffects()
Disables all effects currently attached to this. If you want to disable only a single effect, use disableEffect(int).


isEffected

boolean isEffected()
Returns true if at least one effect in the chain is enabled.

Returns:
true if at least one effect in the effects chain is enabled

isEnabled

boolean isEnabled(AudioEffect effect)
Returns true if effect is in the chain and is also enabled.

Parameters:
effect - the AudioEffect to check the status of
Returns:
true if effect is in the chain and is enabled

addEffect

void addEffect(AudioEffect effect)
Adds an effect to the effects chain.

Parameters:
effect - the AudioEffect to add

getEffect

AudioEffect getEffect(int i)
Returns the ith effect in the effect chain. This method is not required to do bounds checking and may throw an ArrayOutOfBoundsException if i is larger than effectCount().

Parameters:
i - which effect to return
Returns:
the requested effect

effectCount

int effectCount()
Returns the number of effects in the chain.

Returns:
the number of effects in the chain

hasEffect

boolean hasEffect(AudioEffect effect)
Returns true if effect is in the chain.

Parameters:
effect - the effec to check for
Returns:
true if effect is attached to this

enableEffect

void enableEffect(int i)
Enables the ith effect in the effect chain.

Parameters:
i - the index of the effect to enable

enableEffect

void enableEffect(AudioEffect effect)
Enables effect if it is in the chain.

Parameters:
effect - the AudioEffect to enable

disableEffect

void disableEffect(int i)
disables the ith effect in the effect chain.

Parameters:
i - the index of the effect to disable

disableEffect

void disableEffect(AudioEffect effect)
Disables effect if it is in the chain.

Parameters:
effect - the AudioEffect to disable

removeEffect

void removeEffect(AudioEffect effect)
Removes effect from the effects chain.

Parameters:
effect - the AudioEffect to remove

removeEffect

AudioEffect removeEffect(int i)
Removes and returns the ith effect in the effect chain.

Parameters:
i - which effect to remove
Returns:
the removed AudioEffect

clearEffects

void clearEffects()
Removes all effects from the effect chain.