Class Equalizer

    • Field Detail

      • BAND_COUNT

        public static final int BAND_COUNT
        Number of bands in the equalizer.
        See Also:
        Constant Field Values
    • Constructor Detail

      • Equalizer

        public Equalizer​(int channelCount,
                         FloatPcmAudioFilter next,
                         float[] bandMultipliers)
        Parameters:
        channelCount - Number of channels in the input.
        next - The next filter in the chain.
        bandMultipliers - The band multiplier values. Keeps using this array internally, so the values can be changed externally.
      • Equalizer

        public Equalizer​(int channelCount,
                         FloatPcmAudioFilter next)
        Parameters:
        channelCount - Number of channels in the input.
        next - The next filter in the chain.
    • Method Detail

      • isCompatible

        public static boolean isCompatible​(AudioDataFormat format)
        Parameters:
        format - Audio output format.
        Returns:
        true if the output format is compatible for the equalizer (based on sample rate).
      • process

        public void process​(float[][] input,
                            int offset,
                            int length)
                     throws java.lang.InterruptedException
        Specified by:
        process in interface FloatPcmAudioFilter
        Parameters:
        input - An array of samples for each channel
        offset - Offset in the arrays to start at
        length - Length of the target sequence in arrays
        Throws:
        java.lang.InterruptedException - When interrupted externally (or for seek/stop).
      • seekPerformed

        public void seekPerformed​(long requestedTime,
                                  long providedTime)
        Description copied from interface: AudioFilter
        Indicates that the next samples are not a continuation from the previous ones and gives the timecode for the next incoming sample.
        Specified by:
        seekPerformed in interface AudioFilter
        Parameters:
        requestedTime - Timecode in milliseconds to which the seek was requested to
        providedTime - Timecode in milliseconds to which the seek was actually performed to
      • flush

        public void flush()
                   throws java.lang.InterruptedException
        Description copied from interface: AudioFilter
        Flush everything to output.
        Specified by:
        flush in interface AudioFilter
        Throws:
        java.lang.InterruptedException - When interrupted externally (or for seek/stop).
      • close

        public void close()
        Description copied from interface: AudioFilter
        Free all resources. No more input is expected.
        Specified by:
        close in interface AudioFilter