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
-
public class PitchFilter extends SoundFilter
-
-
Constructor Summary
Constructors Constructor Description PitchFilter(float pitchMinValue, float pitchMaxValue)Creates an PitchFilter with the specified minimum and maximum relative original sound pitch (in percent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfilter(byte[] samples, int offset, int length, int sampleSizeInBits)Filter do nothing, only AudioFormat was modifiedjavax.sound.sampled.AudioFormatgetAudioFormat(javax.sound.sampled.AudioInputStream audioInputStream)Apply coefficient to the original audio input format pitchfloatgetPitchMaxValue()floatgetPitchMinValue()voidsetPitchMaxValue(float pitchMaxValue)set the pitch max valuevoidsetPitchMinValue(float pitchMinValue)ste the pitch min value-
Methods inherited from class fr.paris.lutece.plugins.captcha.modules.jcaptcha.service.sound.filter.SoundFilter
get16bitSample, get8bitSample, getRemainingSize, reset, set16bitSample, set8bitSample
-
-
-
-
Method Detail
-
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
public javax.sound.sampled.AudioFormat getAudioFormat(javax.sound.sampled.AudioInputStream audioInputStream)
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
-
-