private static final class IOSMediaPlayer.NullAudioSpectrum extends java.lang.Object implements AudioSpectrum
| Modifier and Type | Field and Description |
|---|---|
private int |
bandCount |
private boolean |
enabled |
private float[] |
fakeData |
private double |
interval |
private int |
threshold |
| Modifier | Constructor and Description |
|---|---|
private |
NullAudioSpectrum() |
| Modifier and Type | Method and Description |
|---|---|
int |
getBandCount()
Gets the number of bands in the audio spectrum
|
boolean |
getEnabled()
Returns whether audio spectrum is enabled or not.
|
double |
getInterval()
Returns the interval between
AudioSpectrumEvent |
float[] |
getMagnitudes(float[] mag)
Returns an array of the last available magnitudes.
|
float[] |
getPhases(float[] phs)
Returns an array of the last available phases.
|
int |
getSensitivityThreshold()
Returns sensitivity threshold in dB.
|
void |
setBandCount(int bands)
Sets the number of bands in the audio spectrum
|
void |
setEnabled(boolean enabled)
Turns on or off audio spectrum support.
|
void |
setInterval(double interval)
Set the interval between
AudioSpectrumEvent |
void |
setSensitivityThreshold(int threshold)
Sets sensitivity threshold in dB.
|
private boolean enabled
private int bandCount
private double interval
private int threshold
private float[] fakeData
public boolean getEnabled()
AudioSpectrumgetEnabled in interface AudioSpectrumpublic void setEnabled(boolean enabled)
AudioSpectrumsetEnabled in interface AudioSpectrumpublic int getBandCount()
AudioSpectrumgetBandCount in interface AudioSpectrumpublic void setBandCount(int bands)
AudioSpectrumsetBandCount in interface AudioSpectrumbands - integer valuepublic double getInterval()
AudioSpectrumAudioSpectrumEvents in seconds.getInterval in interface AudioSpectrumpublic void setInterval(double interval)
AudioSpectrumAudioSpectrumEvents in seconds.setInterval in interface AudioSpectruminterval - double valuepublic int getSensitivityThreshold()
AudioSpectrumgetSensitivityThreshold in interface AudioSpectrumpublic void setSensitivityThreshold(int threshold)
AudioSpectrumsetSensitivityThreshold in interface AudioSpectrumthreshold - int valuepublic float[] getMagnitudes(float[] mag)
AudioSpectrumsetBandCount(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.getMagnitudes in interface AudioSpectrummag - An optionally preallocated double array.public float[] getPhases(float[] phs)
AudioSpectrumsetBandCount(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.getPhases in interface AudioSpectrumphs - An optionally preallocated double array.