fr.paris.lutece.plugins.captcha.modules.jcaptcha.service.sound.filter
Class PitchFilter

java.lang.Object
  extended by fr.paris.lutece.plugins.captcha.modules.jcaptcha.service.sound.filter.SoundFilter
      extended by fr.paris.lutece.plugins.captcha.modules.jcaptcha.service.sound.filter.PitchFilter

public class PitchFilter
extends SoundFilter


Field Summary
 
Fields inherited from class fr.paris.lutece.plugins.captcha.modules.jcaptcha.service.sound.filter.SoundFilter
SAMPLE_SIZE_16_BIT, SAMPLE_SIZE_8_BIT
 
Constructor Summary
PitchFilter(float pitchMinValue, float pitchMaxValue)
          Creates an PitchFilter with the specified minimum and maximum relative original sound pitch (in percent)
 
Method Summary
 void filter(byte[] samples, int offset, int length, int sampleSizeInBits)
          Filter do nothing, only AudioFormat was modified
 AudioFormat getAudioFormat(AudioInputStream audioInputStream)
          Apply coefficient to the original audio input format pitch
 float getPitchMaxValue()
           
 float getPitchMinValue()
           
 void setPitchMaxValue(float pitchMaxValue)
          set the pitch max value
 void setPitchMinValue(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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 Value
pitchMaxValue - the pitch Max Value
Method Detail

filter

public void filter(byte[] samples,
                   int offset,
                   int length,
                   int sampleSizeInBits)
Filter do nothing, only AudioFormat was modified

Specified by:
filter in class SoundFilter
Parameters:
samples - the samples
offset - the offset
length - the length
sampleSizeInBits - the sample size in bits

getAudioFormat

public AudioFormat getAudioFormat(AudioInputStream audioInputStream)
Apply coefficient to the original audio input format pitch

Overrides:
getAudioFormat in class SoundFilter
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


Copyright © 2014 Mairie de Paris. All Rights Reserved.