be.hogent.tarsos.dsp
Interface AudioProcessor

All Known Implementing Classes:
AudioPlayer, AutoCorrelation, ConstantQ, EnvelopeFollower, GainProcessor, Goertzel, MultichannelToMono, Oscilloscope, PitchProcessor, SilenceDetector, StopAudioProcessor, WaveformSimilarityBasedOverlapAdd, WaveformWriter

public interface AudioProcessor

AudioProcessors are responsible for actual digital signal processing. The interface is simple: a process method that works on an AudioEvent object. The AudioEvent contains a buffer with some floats and the same information in raw bytes.

AudioProcessors are meant to be chained e.g. execute an effect and then play the sound. The chain of audio processor can be interrupted by returning false in the process methods.

Author:
Joren Six

Method Summary
 boolean process(AudioEvent audioEvent)
          Process the audio event.
 void processingFinished()
          Notify the AudioProcessor that no more data is available and processing has finished.
 

Method Detail

process

boolean process(AudioEvent audioEvent)
Process the audio event. Do the actual signal processing on an (optionally) overlapping buffer.

Parameters:
audioEvent - The audio event that contains audio data.
Returns:
False if the chain needs to stop here, true otherwise. This can be used to implement e.g. a silence detector.

processingFinished

void processingFinished()
Notify the AudioProcessor that no more data is available and processing has finished. Can be used to deallocate resources or cleanup.