public interface Effectable
Effectable
object is simply one that can have
AudioEffect
s 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.Modifier and Type | Method and Description |
---|---|
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
i th 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
i th 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. |
void effects()
enableEffect(int)
.void noEffects()
disableEffect(int)
.boolean isEffected()
boolean isEnabled(AudioEffect effect)
effect
is in the chain and is also enabled.effect
- the AudioEffect
to check the status ofeffect
is in the chain and is enabledvoid addEffect(AudioEffect effect)
effect
- the AudioEffect to addAudioEffect getEffect(int i)
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()
.i
- which effect to returnint effectCount()
boolean hasEffect(AudioEffect effect)
effect
is in the chain.effect
- the effec to check foreffect
is attached to thisvoid enableEffect(int i)
i
th effect in the effect chain.i
- the index of the effect to enablevoid enableEffect(AudioEffect effect)
effect
if it is in the chain.effect
- the AudioEffect
to enablevoid disableEffect(int i)
i
th effect in the effect chain.i
- the index of the effect to disablevoid disableEffect(AudioEffect effect)
effect
if it is in the chain.effect
- the AudioEffect
to disablevoid removeEffect(AudioEffect effect)
effect
from the effects chain.effect
- the AudioEffect to removeAudioEffect removeEffect(int i)
ith
effect in the
effect chain.i
- which effect to removeAudioEffect
void clearEffects()