Module javafx.media

Class AudioEqualizer

java.lang.Object
javafx.scene.media.AudioEqualizer

public final class AudioEqualizer
extends Object
The AudioEqualizer class provides audio equalization control for a media player. It contains an ObservableList of EqualizerBand elements. Each AudioEqualizer instance is connected to a MediaPlayer and may be obtained using the MediaPlayer.getAudioEqualizer method.
Since:
JavaFX 2.0
See Also:
MediaPlayer, EqualizerBand
  • Property Details

    • enabled

      public BooleanProperty enabledProperty
      Enables or disables AudioEqualizer. If the enabled property is set to false, AudioEqualizer settings are preserved but not taken into account during playback, which is equivalent to setting all EqualizerBand.gain properties to zero.
      Default value:
      true
      See Also:
      isEnabled(), setEnabled(boolean)
  • Field Details

    • MAX_NUM_BANDS

      public static final int MAX_NUM_BANDS
      Maximum number of bands an AudioEqualizer may contain. In the current implementation this value is 64.
      See Also:
      Constant Field Values
  • Method Details

    • getBands

      public final ObservableList<EqualizerBand> getBands()
      ObservableList containing EqualizerBand elements. The content of the sequence may be changed by adding or removing EqualizerBand elements. When adding elements, the user must be prepared to catch IllegalArgumentExceptions because any change to the internal list can be vetoed if a newly added instance is not valid.

      The constraints for a valid EqualizerBand instance are:

      The default set of bands is as in the following table; all bands have unity gain (0 dB).

      AudioEqualizer Band Table
      Band IndexCenter Frequency (Hz)Bandwidth (Hz)
      03219
      16439
      212578
      3250156
      4500312
      51000625
      620001250
      740002500
      880005000
      91600010000
      Returns:
      ObservableList containing EqualizerBand elements.
    • setEnabled

      public final void setEnabled​(boolean value)
      Sets the value of the property enabled.
      Property description:
      Enables or disables AudioEqualizer. If the enabled property is set to false, AudioEqualizer settings are preserved but not taken into account during playback, which is equivalent to setting all EqualizerBand.gain properties to zero.
      Default value:
      true
    • isEnabled

      public final boolean isEnabled()
      Gets the value of the property enabled.
      Property description:
      Enables or disables AudioEqualizer. If the enabled property is set to false, AudioEqualizer settings are preserved but not taken into account during playback, which is equivalent to setting all EqualizerBand.gain properties to zero.
      Default value:
      true
    • enabledProperty

      public BooleanProperty enabledProperty()
      Enables or disables AudioEqualizer. If the enabled property is set to false, AudioEqualizer settings are preserved but not taken into account during playback, which is equivalent to setting all EqualizerBand.gain properties to zero.
      Default value:
      true
      See Also:
      isEnabled(), setEnabled(boolean)