public interface AudioSpectrum
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[] magnitudes)
Returns an array of the last available magnitudes.
|
float[] |
getPhases(float[] phases)
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.
|
boolean getEnabled()
void setEnabled(boolean enabled)
enable
- boolean valueint getBandCount()
void setBandCount(int bands)
bands
- integer valuedouble getInterval()
AudioSpectrumEvents in seconds.
void setInterval(double interval)
AudioSpectrumEvents in seconds.
interval
- double valueint getSensitivityThreshold()
void setSensitivityThreshold(int threshold)
threshold
- int valuefloat[] getMagnitudes(float[] magnitudes)
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.magnitudes
- An optionally preallocated double array.float[] getPhases(float[] phases)
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.phases
- An optionally preallocated double array.Copyright © 2020. All rights reserved.