Package be.tarsos.dsp
Class StopAudioProcessor
java.lang.Object
be.tarsos.dsp.StopAudioProcessor
- All Implemented Interfaces:
AudioProcessor
public class StopAudioProcessor extends java.lang.Object implements AudioProcessor
Simply stops the audio processing
pipeline if the stop time is reached.
- Author:
- Joren Six
-
Constructor Summary
Constructors Constructor Description StopAudioProcessor(double stopTime)
-
Method Summary
Modifier and Type Method Description double
getStopAt()
boolean
process(AudioEvent audioEvent)
Process the audio event.void
processingFinished()
Notify the AudioProcessor that no more data is available and processing has finished.void
setStopTime(double stopTime)
-
Constructor Details
-
StopAudioProcessor
public StopAudioProcessor(double stopTime)
-
-
Method Details
-
process
Description copied from interface:AudioProcessor
Process the audio event. Do the actual signal processing on an (optionally) overlapping buffer.- Specified by:
process
in interfaceAudioProcessor
- 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
public void processingFinished()Description copied from interface:AudioProcessor
Notify the AudioProcessor that no more data is available and processing has finished. Can be used to deallocate resources or cleanup.- Specified by:
processingFinished
in interfaceAudioProcessor
-
getStopAt
public double getStopAt() -
setStopTime
public void setStopTime(double stopTime)
-