public class RateTransposer extends java.lang.Object implements AudioProcessor
| Constructor and Description |
|---|
RateTransposer(double factor)
Create a new sample rate transposer.
|
| 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 |
setFactor(double tempo) |
public RateTransposer(double factor)
factor - Determines the new sample rate. E.g. 0.5 is half the sample
rate, 1.0 does not change a thing and 2.0 doubles the sample
rate. If the samples are played at the original speed the
pitch doubles (0.5), does not change (1.0) or halves (0.5)
respectively. Playback length follows the same rules,
obviously.public void setFactor(double tempo)
public boolean process(AudioEvent audioEvent)
AudioProcessorprocess in interface AudioProcessoraudioEvent - The audio event that contains audio data.public void processingFinished()
AudioProcessorprocessingFinished in interface AudioProcessor