Package 

Class MediaPlayer.Equalizer

    • Method Summary

      Modifier and Type Method Description
      static MediaPlayer.Equalizer create() Create a new default equalizer, with all frequency values zeroed.
      static MediaPlayer.Equalizer createFromPreset(int index) Create a new equalizer, with initial frequency values copied from an existingpreset.
      static int getPresetCount() Get the number of equalizer presets.
      static String getPresetName(int index) Get the name of a particular equalizer preset.This name can be used, for example, to prepare a preset label or menu in a userinterface.
      static int getBandCount() Get the number of distinct frequency bands for an equalizer.
      static float getBandFrequency(int index) Get a particular equalizer band frequency.This value can be used, for example, to create a label for an equalizer band controlin a user interface.
      float getPreAmp() Get the current pre-amplification value from an equalizer.
      boolean setPreAmp(float preamp) Set a new pre-amplification value for an equalizer.
      float getAmp(int index) Get the amplification value for a particular equalizer frequency band.
      boolean setAmp(int index, float amp) Set a new amplification value for a particular equalizer frequency band.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • create

         static MediaPlayer.Equalizer create()

        Create a new default equalizer, with all frequency values zeroed.The new equalizer can subsequently be applied to a media player by invoking setEqualizer.

      • createFromPreset

         static MediaPlayer.Equalizer createFromPreset(int index)

        Create a new equalizer, with initial frequency values copied from an existingpreset.The new equalizer can subsequently be applied to a media player by invoking setEqualizer.

      • getPresetCount

         static int getPresetCount()

        Get the number of equalizer presets.

      • getPresetName

         static String getPresetName(int index)

        Get the name of a particular equalizer preset.This name can be used, for example, to prepare a preset label or menu in a userinterface.

        Parameters:
        index - index of the preset, counting from zero.
      • getBandCount

         static int getBandCount()

        Get the number of distinct frequency bands for an equalizer.

      • getBandFrequency

         static float getBandFrequency(int index)

        Get a particular equalizer band frequency.This value can be used, for example, to create a label for an equalizer band controlin a user interface.

        Parameters:
        index - index of the band, counting from zero.
      • getPreAmp

         float getPreAmp()

        Get the current pre-amplification value from an equalizer.

      • setPreAmp

         boolean setPreAmp(float preamp)

        Set a new pre-amplification value for an equalizer.The new equalizer settings are subsequently applied to a media player by invoking setEqualizer.The supplied amplification value will be clamped to the -20.0 to +20.0 range.

        Parameters:
        preamp - value (-20.0 to 20.
      • getAmp

         float getAmp(int index)

        Get the amplification value for a particular equalizer frequency band.

        Parameters:
        index - counting from zero, of the frequency band to get.
      • setAmp

         boolean setAmp(int index, float amp)

        Set a new amplification value for a particular equalizer frequency band.The new equalizer settings are subsequently applied to a media player by invoking setEqualizer.The supplied amplification value will be clamped to the -20.0 to +20.0 range.

        Parameters:
        index - counting from zero, of the frequency band to set.
        amp - amplification value (-20.0 to 20.0 Hz).\return true on success.