Spec-Zone.ru › OpenJavaFX 8
javafx.scene.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 Summary

    All MethodsInstance MethodsConcrete Methods
    Type Property and Description
    BooleanProperty enabled
    Whether the AudioEqualizer is enabled.
  • Field Summary

    Fields
    Modifier and Type Field and Description
    static int MAX_NUM_BANDS
    Maximum number of bands an AudioEqualizer may contain.
  • Method Summary

    All MethodsInstance MethodsConcrete Methods
    Modifier and Type Method and Description
    BooleanProperty enabledProperty()
    Whether the AudioEqualizer is enabled.
    ObservableList<EqualizerBand> getBands()
    ObservableList containing EqualizerBand elements.
    boolean isEnabled()
    Return enabled state of the AudioEqualizer.
    void setEnabled(boolean value)
    Enables or disables AudioEqualizer.
    • Methods inherited from class java.lang.Object

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

    • enabled

      public BooleanProperty enabledProperty
      Whether the AudioEqualizer is enabled. The default value is true.

      See Also:

      isEnabled(), setEnabled(boolean)

  • Field Detail

    • 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 Detail

    • 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 the internal list is a VetoableObservableList and any change to the list can be vetoed if a newly added instance is not valid.

      The constraints for a valid EqualizerBand instance are:

      • EqualizerBand.centerFrequency > 0
      • EqualizerBand.bandwidth > 0
      • EqualizerBand.MIN_GAIN ≤ EqualizerBand.gain ≤ EqualizerBand.MAX_GAIN

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

      Band Index Center Frequency (Hz) Bandwidth (Hz)
      0 32 19
      1 64 39
      2 125 78
      3 250 156
      4 500 312
      5 1000 625
      6 2000 1250
      7 4000 2500
      8 8000 5000
      9 16000 10000

      Returns:

      ObservableList containing EqualizerBand elements.

      Throws:

      IllegalArgumentException

    • setEnabled

      public final void setEnabled(boolean value)
      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.
    • isEnabled

      public final boolean isEnabled()
      Return enabled state of the AudioEqualizer.

      Returns:

      true if AudioEqulizer is enabled, false otherwise.

    • enabledProperty

      public BooleanProperty enabledProperty()
      Whether the AudioEqualizer is enabled. The default value is true.

      See Also:

      isEnabled(), setEnabled(boolean)

© 2008, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from JavaFX API Documentation.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Java, JavaFX and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API