APIdia Launch Partner
Top Fields Constructors Methods
com.sun.media.jfxmediaimpl

pack-priv final Class NativeAudioSpectrum

extends Object
implements AudioSpectrum
Class Inheritance
All Implemented Interfaces
com.sun.media.jfxmedia.effects.AudioSpectrum
Imports
com.sun.media.jfxmedia.effects.AudioSpectrum

Field Summary

Modifier and TypeField and Description
public static final int
public static final double
public static final int
private static final float[]
private float[]
private final long
nativeRef

Handle to the native spectrum.

private float[]

Constructor Summary

AccessConstructor and Description
pack-priv
NativeAudioSpectrum(long refMedia)

Constructor.

Method Summary

Modifier and TypeMethod and Description
public int
getBandCount()

Implements com.sun.media.jfxmedia.effects.AudioSpectrum.getBandCount.

Gets the number of bands in the audio spectrum

public boolean
getEnabled()

Implements com.sun.media.jfxmedia.effects.AudioSpectrum.getEnabled.

Returns whether audio spectrum is enabled or not.

public double
getInterval()

Implements com.sun.media.jfxmedia.effects.AudioSpectrum.getInterval.

Returns the interval between AudioSpectrumEvents in seconds.

public float[]
getMagnitudes(float[] mag)

Implements com.sun.media.jfxmedia.effects.AudioSpectrum.getMagnitudes.

Returns an array of the last available magnitudes.

public float[]
getPhases(float[] phs)

Implements com.sun.media.jfxmedia.effects.AudioSpectrum.getPhases.

Returns an array of the last available phases.

public int
private native boolean
nativeGetEnabled(long nativeRef)

private native double
nativeGetInterval(long nativeRef)

private native int
nativeGetThreshold(long nativeRef)

private native void
nativeSetBands(long nativeRef, int bands, float[] magnitudes, float[] phases)

private native void
nativeSetEnabled(long nativeRef, boolean enable)

private native void
nativeSetInterval(long nativeRef, double interval)

private native void
nativeSetThreshold(long nativeRef, int threshold)

public void
setBandCount(int bands)

Implements com.sun.media.jfxmedia.effects.AudioSpectrum.setBandCount.

Sets the number of bands in the audio spectrum

public void
setEnabled(boolean enabled)

Implements com.sun.media.jfxmedia.effects.AudioSpectrum.setEnabled.

Turns on or off audio spectrum support.

public void
setInterval(double interval)

Implements com.sun.media.jfxmedia.effects.AudioSpectrum.setInterval.

Set the interval between AudioSpectrumEvents in seconds.

public void
setSensitivityThreshold(int threshold)

Implements com.sun.media.jfxmedia.effects.AudioSpectrum.setSensitivityThreshold.

Sets sensitivity threshold in dB.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEFAULT_BANDSback to summary
public static final int DEFAULT_BANDS
DEFAULT_INTERVALback to summary
public static final double DEFAULT_INTERVAL
DEFAULT_THRESHOLDback to summary
public static final int DEFAULT_THRESHOLD
EMPTY_FLOAT_ARRAYback to summary
private static final float[] EMPTY_FLOAT_ARRAY
magnitudesback to summary
private float[] magnitudes
nativeRefback to summary
private final long nativeRef

Handle to the native spectrum.

phasesback to summary
private float[] phases

Constructor Detail

NativeAudioSpectrumback to summary
pack-priv NativeAudioSpectrum(long refMedia)

Constructor.

Method Detail

getBandCountback to summary
public int getBandCount()

Implements com.sun.media.jfxmedia.effects.AudioSpectrum.getBandCount.

Doc from com.sun.media.jfxmedia.effects.AudioSpectrum.getBandCount.

Gets the number of bands in the audio spectrum

Annotations
@Override
getEnabledback to summary
public boolean getEnabled()

Implements com.sun.media.jfxmedia.effects.AudioSpectrum.getEnabled.

Doc from com.sun.media.jfxmedia.effects.AudioSpectrum.getEnabled.

Returns whether audio spectrum is enabled or not.

Annotations
@Override
getIntervalback to summary
public double getInterval()

Implements com.sun.media.jfxmedia.effects.AudioSpectrum.getInterval.

Doc from com.sun.media.jfxmedia.effects.AudioSpectrum.getInterval.

Returns the interval between AudioSpectrumEvents in seconds.

Annotations
@Override
getMagnitudesback to summary
public float[] getMagnitudes(float[] mag)

Implements com.sun.media.jfxmedia.effects.AudioSpectrum.getMagnitudes.

Doc from com.sun.media.jfxmedia.effects.AudioSpectrum.getMagnitudes.

Returns an array of the last available magnitudes. The size of the array equals the number of bands set by the setBandCount(int) method. A newly created array contains Float.NEGATIVE_INFINITY values. When the number of bands is 0 this method returns an empty array. If a non-null array large enough to hold the values is passed in, it will be used; otherwise a newly allocated array will be returned.

Annotations
@Override
getPhasesback to summary
public float[] getPhases(float[] phs)

Implements com.sun.media.jfxmedia.effects.AudioSpectrum.getPhases.

Doc from com.sun.media.jfxmedia.effects.AudioSpectrum.getPhases.

Returns an array of the last available phases. The size of the array equals the number of bands set by the setBandCount(int) method. A newly created array contains 0.0 values. When the number of bands is 0 this method returns an empty array. If a non-null array large enough to hold the values is passed in, it will be used; otherwise a newly allocated array will be returned.

Annotations
@Override
getSensitivityThresholdback to summary
public int getSensitivityThreshold()

Implements com.sun.media.jfxmedia.effects.AudioSpectrum.getSensitivityThreshold.

Doc from com.sun.media.jfxmedia.effects.AudioSpectrum.getSensitivityThreshold.

Returns sensitivity threshold in dB. All lower values will be set to this.

Annotations
@Override
nativeGetEnabledback to summary
private native boolean nativeGetEnabled(long nativeRef)
nativeGetIntervalback to summary
private native double nativeGetInterval(long nativeRef)
nativeGetThresholdback to summary
private native int nativeGetThreshold(long nativeRef)
nativeSetBandsback to summary
private native void nativeSetBands(long nativeRef, int bands, float[] magnitudes, float[] phases)
nativeSetEnabledback to summary
private native void nativeSetEnabled(long nativeRef, boolean enable)
nativeSetIntervalback to summary
private native void nativeSetInterval(long nativeRef, double interval)
nativeSetThresholdback to summary
private native void nativeSetThreshold(long nativeRef, int threshold)
setBandCountback to summary
public void setBandCount(int bands)

Implements com.sun.media.jfxmedia.effects.AudioSpectrum.setBandCount.

Doc from com.sun.media.jfxmedia.effects.AudioSpectrum.setBandCount.

Sets the number of bands in the audio spectrum

Annotations
@Override
setEnabledback to summary
public void setEnabled(boolean enabled)

Implements com.sun.media.jfxmedia.effects.AudioSpectrum.setEnabled.

Doc from com.sun.media.jfxmedia.effects.AudioSpectrum.setEnabled.

Turns on or off audio spectrum support.

Annotations
@Override
setIntervalback to summary
public void setInterval(double interval)

Implements com.sun.media.jfxmedia.effects.AudioSpectrum.setInterval.

Doc from com.sun.media.jfxmedia.effects.AudioSpectrum.setInterval.

Set the interval between AudioSpectrumEvents in seconds.

Annotations
@Override
setSensitivityThresholdback to summary
public void setSensitivityThreshold(int threshold)

Implements com.sun.media.jfxmedia.effects.AudioSpectrum.setSensitivityThreshold.

Doc from com.sun.media.jfxmedia.effects.AudioSpectrum.setSensitivityThreshold.

Sets sensitivity threshold in dB. All lower values will be set to this. Allowed values: <= 0

Annotations
@Override