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()
AudioSpectrum
getEnabled
in interface AudioSpectrum
public void setEnabled(boolean enabled)
AudioSpectrum
setEnabled
in interface AudioSpectrum
public int getBandCount()
AudioSpectrum
getBandCount
in interface AudioSpectrum
public void setBandCount(int bands)
AudioSpectrum
setBandCount
in interface AudioSpectrum
bands
- integer valuepublic double getInterval()
AudioSpectrum
AudioSpectrumEvents in seconds.
getInterval
in interface AudioSpectrum
public void setInterval(double interval)
AudioSpectrum
AudioSpectrumEvents in seconds.
setInterval
in interface AudioSpectrum
interval
- double valuepublic int getSensitivityThreshold()
AudioSpectrum
getSensitivityThreshold
in interface AudioSpectrum
public void setSensitivityThreshold(int threshold)
AudioSpectrum
setSensitivityThreshold
in interface AudioSpectrum
threshold
- int valuepublic float[] getMagnitudes(float[] mag)
AudioSpectrum
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.getMagnitudes
in interface AudioSpectrum
mag
- An optionally preallocated double array.public float[] getPhases(float[] phs)
AudioSpectrum
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.getPhases
in interface AudioSpectrum
phs
- An optionally preallocated double array.