Spec-Zone.ru › OpenJavaFX 8
javafx.scene.media

Interface AudioSpectrumListener



public interface AudioSpectrumListener
Audio spectrum callback interface. The observer receives periodic updates of the audio spectrum. A single observer may be attached to a given MediaPlayer using MediaPlayer.setAudioSpectrumListener(javafx.scene.media.AudioSpectrumListener).

Since:

JavaFX 2.0

See Also:

MediaPlayer

  • Method Summary

    All MethodsInstance MethodsAbstract Methods
    Modifier and Type Method and Description
    void spectrumDataUpdate(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 via MediaPlayer.setAudioSpectrumNumBands(int) and MediaPlayer.setAudioSpectrumThreshold(int), respectively. The default values of the settings are an interval of 0.1 seconds, 128 bands, and sensitivity threshold -60.0 dB.

      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.

Spec-Zone.ru

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