final class NativeAudioEqualizer extends java.lang.Object implements AudioEqualizer
Modifier and Type | Field and Description |
---|---|
private long |
nativeRef
Handle to the native equalizer.
|
MAX_NUM_BANDS
Constructor and Description |
---|
NativeAudioEqualizer(long nativeRef)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
EqualizerBand |
addBand(double centerFrequency,
double bandwidth,
double gain)
Adds a band to the equalizer.
|
boolean |
getEnabled()
Returns whether equalization was enabled or not.
|
private EqualizerBand |
nativeAddBand(long nativeRef,
double centerFrequency,
double bandwidth,
double gain) |
private boolean |
nativeGetEnabled(long nativeRef) |
private int |
nativeGetNumBands(long nativeRef) |
private boolean |
nativeRemoveBand(long nativeRef,
double centerFrequency) |
private void |
nativeSetEnabled(long nativeRef,
boolean enable) |
boolean |
removeBand(double centerFrequency)
Removes an equalizer band with the specified center frequency.
|
void |
setEnabled(boolean enable)
Turns on or off audio equalization.
|
NativeAudioEqualizer(long nativeRef)
nativeRef
- A reference to the native component.public boolean getEnabled()
AudioEqualizer
getEnabled
in interface AudioEqualizer
public void setEnabled(boolean enable)
AudioEqualizer
setEnabled
in interface AudioEqualizer
enable
- boolean valuepublic EqualizerBand addBand(double centerFrequency, double bandwidth, double gain)
AudioEqualizer
addBand
in interface AudioEqualizer
centerFrequency
already exists.public boolean removeBand(double centerFrequency)
AudioEqualizer
removeBand
in interface AudioEqualizer
private boolean nativeGetEnabled(long nativeRef)
private void nativeSetEnabled(long nativeRef, boolean enable)
private int nativeGetNumBands(long nativeRef)
private EqualizerBand nativeAddBand(long nativeRef, double centerFrequency, double bandwidth, double gain)
private boolean nativeRemoveBand(long nativeRef, double centerFrequency)