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 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 Value
      pitchMaxValue - 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:
      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