Class PitchFilter

    • 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)
    • 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 javax.sound.sampled.AudioFormat getAudioFormat​(javax.sound.sampled.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