Interface AudioSpectrumListener
public interface AudioSpectrumListener
MediaPlayer using MediaPlayer.setAudioSpectrumListener(javafx.scene.media.AudioSpectrumListener).Since:
JavaFX 2.0
See Also:
-
Method Summary
All MethodsInstance MethodsAbstract Methods Modifier and Type Method and Description voidspectrumDataUpdate(double timestamp, double duration, float[] magnitudes, float[] phases)Notifies the observer about new data available for the audio spectrum.
-
Method Detail
-
spectrumDataUpdate
void spectrumDataUpdate(double timestamp, double duration, float[] magnitudes, float[] phases)Notifies the observer about new data available for the audio spectrum.The notification period for updates may be set using
MediaPlayer.setAudioSpectrumInterval(double), and the number of bands and sensitivity threshold viaMediaPlayer.setAudioSpectrumNumBands(int)andMediaPlayer.setAudioSpectrumThreshold(int), respectively. The default values of the settings are an interval of0.1seconds,128bands, and sensitivity threshold-60.0dB.The arrays passed to the listener should be considered to be read-only as the underlying implementation may re-use them.
Parameters:
timestamp- timestamp of the event in seconds.
-
© 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.