Top Methods
com.sun.media.jfxmedia.effects

public Interface AudioSpectrum

Known Direct Implementers
com.sun.media.jfxmediaimpl.NativeAudioSpectrum, com.sun.media.jfxmediaimpl.platform.ios.IOSMediaPlayer.NullAudioSpectrum

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

int value
getBandCount
()

Gets the number of bands in the audio spectrum

public boolean

Returns:

boolean value
getEnabled
()

Returns whether audio spectrum is enabled or not.

public double

Returns:

double value
getInterval
()

Returns the interval between AudioSpectrumEvents in seconds.

public float[]

Returns:

array of float values.
getMagnitudes
(float[]
An optionally preallocated double array.
magnitudes
)

Returns an array of the last available magnitudes.

public float[]

Returns:

array of float values.
getPhases
(float[]
An optionally preallocated double array.
phases
)

Returns an array of the last available phases.

public int

Returns:

int value
getSensitivityThreshold
()

Returns sensitivity threshold in dB.

public void
setBandCount(int
integer value
bands
)

Sets the number of bands in the audio spectrum

public void
setEnabled(boolean
boolean value
enabled
)

Turns on or off audio spectrum support.

public void
setInterval(double
double value
interval
)

Set the interval between AudioSpectrumEvents in seconds.

public void
setSensitivityThreshold(int
int value
threshold
)

Sets sensitivity threshold in dB.

Method Detail

getBandCountback to summary
public int getBandCount()

Gets the number of bands in the audio spectrum

Returns:int

int value

getEnabledback to summary
public boolean getEnabled()

Returns whether audio spectrum is enabled or not.

Returns:boolean

boolean value

getIntervalback to summary
public double getInterval()

Returns the interval between AudioSpectrumEvents in seconds.

Returns:double

double value

getMagnitudesback to summary
public float[] getMagnitudes(float[] magnitudes)

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.

Parameters
magnitudes:float[]

An optionally preallocated double array.

Returns:float[]

array of float values.

getPhasesback to summary
public float[] getPhases(float[] phases)

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.

Parameters
phases:float[]

An optionally preallocated double array.

Returns:float[]

array of float values.

getSensitivityThresholdback to summary
public int getSensitivityThreshold()

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

Returns:int

int value

setBandCountback to summary
public void setBandCount(int bands)

Sets the number of bands in the audio spectrum

Parameters
bands:int

integer value

setEnabledback to summary
public void setEnabled(boolean enabled)

Turns on or off audio spectrum support.

Parameters
enabled:boolean

boolean value

setIntervalback to summary
public void setInterval(double interval)

Set the interval between AudioSpectrumEvents in seconds.

Parameters
interval:double

double value

setSensitivityThresholdback to summary
public void setSensitivityThreshold(int threshold)

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

Parameters
threshold:int

int value