public class DelayEffect extends java.lang.Object implements AudioProcessor
Adds an echo effect to the signal.
Constructor and Description |
---|
DelayEffect(double echoLength,
double decay,
double sampleRate) |
Modifier and Type | Method and Description |
---|---|
boolean |
process(AudioEvent audioEvent)
Process the audio event.
|
void |
processingFinished()
Notify the AudioProcessor that no more data is available and processing
has finished.
|
void |
setDecay(double newDecay)
A decay, should be a value between zero and one.
|
void |
setEchoLength(double newEchoLength) |
public DelayEffect(double echoLength, double decay, double sampleRate)
echoLength
- in secondssampleRate
- the sample rate in Hz.decay
- The decay of the echo, a value between 0 and 1. 1 meaning no decay, 0 means immediate decay (not echo effect).public void setEchoLength(double newEchoLength)
newEchoLength
- A new echo buffer length in seconds.public void setDecay(double newDecay)
newDecay
- the new decay (preferably between zero and one).public boolean process(AudioEvent audioEvent)
AudioProcessor
process
in interface AudioProcessor
audioEvent
- The audio event that contains audio data.public void processingFinished()
AudioProcessor
processingFinished
in interface AudioProcessor