@Deprecated public class EffectsChain extends java.lang.Object implements AudioEffect
EffectsChain
is a list of AudioEffects
that
gives you the ability to enable and disable effects, as you would in a typical
DAW. When you add an effect, it is added to the end of the chain and is enabled.
When you remove an effect, effects further down the chain are moved up a slot.
EffectsChain
is itself an AudioEffect
, so you can
easily create groups of effects that can be enabled/disabled together by
putting them in an EffectsChain
and then adding that chain to
an Effectable
as a single effect. EffectsChain
is
fully synchronized
so that it is not possible to add and remove
effects while processing is taking place.Constructor and Description |
---|
EffectsChain()
Deprecated.
Constructs an empty
EffectsChain . |
Modifier and Type | Method and Description |
---|---|
void |
add(AudioEffect e)
Deprecated.
Adds
e to the end of the chain. |
void |
clear()
Deprecated.
Removes all effects from the effect chain.
|
boolean |
contains(AudioEffect e)
Deprecated.
Returns true if
e is in this chain |
void |
disable(AudioEffect e)
Deprecated.
Disables
e if it is in the chain. |
void |
disable(int i)
Deprecated.
Disables the
i th effect in the chain. |
void |
disableAll()
Deprecated.
Disables all effects in the chain.
|
void |
enable(AudioEffect e)
Deprecated.
Enables
e if it is in the chain. |
void |
enable(int i)
Deprecated.
Enables the
i th effect in the chain. |
void |
enableAll()
Deprecated.
Enables all effects in the chain.
|
AudioEffect |
get(int i)
Deprecated.
Gets the
ith effect in the chain. |
boolean |
hasEnabled()
Deprecated.
Returns true if at least one effect in the chain is enabled.
|
boolean |
isEnabled(AudioEffect e)
Deprecated.
Returns true if
e is in the chain and is enabled. |
void |
process(float[] samp)
Deprecated.
Sends
samp to each effect in the chain, in order. |
void |
process(float[] sampL,
float[] sampR)
Deprecated.
Sends
sampL and sampR to each effect
in the chain, in order. |
void |
remove(AudioEffect e)
Deprecated.
Removes
e from the chain. |
AudioEffect |
remove(int i)
Deprecated.
Removes and returns the
i th effect from the chain. |
int |
size()
Deprecated.
Returns the number of effects in the chain.
|
public void add(AudioEffect e)
e
to the end of the chain.e
- the AudioEffect
to addpublic void remove(AudioEffect e)
e
from the chain.e
- the AudioEffect
to removepublic AudioEffect remove(int i)
i
th effect from the chain.i
- the index of the AudioEffect
to removeAudioEffect
that was removedpublic AudioEffect get(int i)
ith
effect in the chain.i
- the index of the AudioEffect
to getith
effect in the chain.public boolean contains(AudioEffect e)
e
is in this chaine
- the AudioEffect
to check fore
is in this chainpublic void enable(int i)
i
th effect in the chain.i
- the index of the effect to enablepublic void enable(AudioEffect e)
e
if it is in the chain.e
- the AudioEffect
to enablepublic void enableAll()
public boolean hasEnabled()
public boolean isEnabled(AudioEffect e)
e
is in the chain and is enabled.e
- the AudioEffect
to return the status ofe
is enabled and in the chainpublic void disable(int i)
i
th effect in the chain.i
- the index of the effect to disablepublic void disable(AudioEffect e)
e
if it is in the chain.e
- the AudioEffect
to disablepublic void disableAll()
public int size()
public void clear()
public void process(float[] samp)
samp
to each effect in the chain, in order.process
in interface AudioEffect
samp
- the samples to processpublic void process(float[] sampL, float[] sampR)
sampL
and sampR
to each effect
in the chain, in order. The two float arrays should correspond to
the left and right channels of a stereo signal.process
in interface AudioEffect
sampL
- the left channel of the signal to processsampR
- the right channel of the signal to process