- java.lang.Object
-
- javafx.scene.media.AudioEqualizer
-
public final class AudioEqualizer extends Object
TheAudioEqualizerclass provides audio equalization control for a media player. It contains anObservableListofEqualizerBandelements. EachAudioEqualizerinstance is connected to aMediaPlayerand may be obtained using theMediaPlayer.getAudioEqualizermethod.- Since:
- JavaFX 2.0
- See Also:
MediaPlayer,EqualizerBand
-
-
Property Summary
Properties Type Property Description BooleanPropertyenabledEnables or disablesAudioEqualizer.
-
Field Summary
Fields Modifier and Type Field Description static intMAX_NUM_BANDSMaximum number of bands anAudioEqualizermay contain.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BooleanPropertyenabledProperty()Enables or disablesAudioEqualizer.ObservableList<EqualizerBand>getBands()ObservableList containingEqualizerBandelements.booleanisEnabled()Gets the value of the property enabled.voidsetEnabled(boolean value)Sets the value of the property enabled.
-
-
-
Property Detail
-
enabled
public BooleanProperty enabledProperty
Enables or disablesAudioEqualizer. If the enabled property is set tofalse,AudioEqualizersettings are preserved but not taken into account during playback, which is equivalent to setting allEqualizerBand.gainproperties to zero.- Default value:
true- See Also:
isEnabled(),setEnabled(boolean)
-
-
Field Detail
-
MAX_NUM_BANDS
public static final int MAX_NUM_BANDS
Maximum number of bands anAudioEqualizermay contain. In the current implementation this value is64.- See Also:
- Constant Field Values
-
-
Method Detail
-
getBands
public final ObservableList<EqualizerBand> getBands()
ObservableList containingEqualizerBandelements. The content of the sequence may be changed by adding or removingEqualizerBandelements. When adding elements, the user must be prepared to catchIllegalArgumentExceptions because any change to the internal list can be vetoed if a newly added instance is not valid.The constraints for a valid
EqualizerBandinstance are:EqualizerBand.centerFrequency> 0EqualizerBand.bandwidth> 0EqualizerBand.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).
AudioEqualizer Band Table 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
EqualizerBandelements.
-
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 tofalse,AudioEqualizersettings are preserved but not taken into account during playback, which is equivalent to setting allEqualizerBand.gainproperties 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 tofalse,AudioEqualizersettings are preserved but not taken into account during playback, which is equivalent to setting allEqualizerBand.gainproperties to zero. - Default value:
true
-
enabledProperty
public BooleanProperty enabledProperty()
Enables or disablesAudioEqualizer. If the enabled property is set tofalse,AudioEqualizersettings are preserved but not taken into account during playback, which is equivalent to setting allEqualizerBand.gainproperties to zero.- Default value:
true- See Also:
isEnabled(),setEnabled(boolean)
-
-