public class PitchProcessor extends java.lang.Object implements AudioProcessor
PitchDetector
interface.Modifier and Type | Class and Description |
---|---|
static class |
PitchProcessor.PitchEstimationAlgorithm
A list of pitch estimation algorithms.
|
Constructor and Description |
---|
PitchProcessor(PitchProcessor.PitchEstimationAlgorithm algorithm,
float sampleRate,
int bufferSize,
PitchDetectionHandler handler)
Initialize a new pitch processor.
|
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.
|
public PitchProcessor(PitchProcessor.PitchEstimationAlgorithm algorithm, float sampleRate, int bufferSize, PitchDetectionHandler handler)
algorithm
- An enum defining the algorithm.sampleRate
- The sample rate of the buffer (Hz).bufferSize
- The size of the buffer in samples.handler
- The handler handles detected pitch.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