Class PitchFilter
java.lang.Object
fr.paris.lutece.plugins.captcha.modules.jcaptcha.service.sound.filter.SoundFilter
fr.paris.lutece.plugins.captcha.modules.jcaptcha.service.sound.filter.PitchFilter
-
Constructor Summary
ConstructorsConstructorDescriptionPitchFilter(float pitchMinValue, float pitchMaxValue) Creates an PitchFilter with the specified minimum and maximum relative original sound pitch (in percent) -
Method Summary
Modifier and TypeMethodDescriptionvoidfilter(byte[] samples, int offset, int length, int sampleSizeInBits) Filter do nothing, only AudioFormat was modifiedgetAudioFormat(AudioInputStream audioInputStream) Apply coefficient to the original audio input format pitchfloatfloatvoidsetPitchMaxValue(float pitchMaxValue) set the pitch max valuevoidsetPitchMinValue(float pitchMinValue) ste the pitch min valueMethods inherited from class fr.paris.lutece.plugins.captcha.modules.jcaptcha.service.sound.filter.SoundFilter
get16bitSample, get8bitSample, getRemainingSize, reset, set16bitSample, set8bitSample
-
Constructor Details
-
PitchFilter
public PitchFilter(float pitchMinValue, float pitchMaxValue) Creates an PitchFilter with the specified minimum and maximum relative original sound pitch (in percent)- Parameters:
pitchMinValue- the pitch Min ValuepitchMaxValue- the pitch Max Value
-
-
Method Details
-
filter
public void filter(byte[] samples, int offset, int length, int sampleSizeInBits) Filter do nothing, only AudioFormat was modified- Specified by:
filterin classSoundFilter- Parameters:
samples- the samplesoffset- the offsetlength- the lengthsampleSizeInBits- the sample size in bits
-
getAudioFormat
Apply coefficient to the original audio input format pitch- Overrides:
getAudioFormatin classSoundFilter- Parameters:
audioInputStream- the audio input stream- Returns:
- the audio format
-
getPitchMinValue
public float getPitchMinValue()- Returns:
- the pitch min value
-
setPitchMinValue
public void setPitchMinValue(float pitchMinValue) ste the pitch min value- Parameters:
pitchMinValue- the pitch min value
-
getPitchMaxValue
public float getPitchMaxValue()- Returns:
- the pitch max value
-
setPitchMaxValue
public void setPitchMaxValue(float pitchMaxValue) set the pitch max value- Parameters:
pitchMaxValue- the pitch max value
-