javazoom.jl.decoder

Class Equalizer

public final class Equalizer extends Object

The Equalizer class can be used to specify equalization settings for the MPEG audio decoder.

The equalizer consists of 32 band-pass filters. Each band of the equalizer can take on a fractional value between -1.0 and +1.0. At -1.0, the input signal is attenuated by 6dB, at +1.0 the signal is amplified by 6dB.

See Also:

Nested Class Summary
abstract static classEqualizer.EQFunction
Field Summary
static floatBAND_NOT_PRESENT
Equalizer setting to denote that a given band will not be present in the output signal.
static EqualizerPASS_THRU_EQ
Constructor Summary
Equalizer()
Creates a new Equalizer instance.
Equalizer(float[] settings)
Equalizer(Equalizer.EQFunction eq)
Method Summary
floatgetBand(int band)
Retrieves the eq setting for a given band.
intgetBandCount()
Retrieves the number of bands present in this equalizer.
voidreset()
Sets all bands to 0.0
floatsetBand(int band, float neweq)
voidsetFrom(float[] eq)
voidsetFrom(Equalizer.EQFunction eq)
voidsetFrom(Equalizer eq)
Sets the bands of this equalizer to the value the bands of another equalizer.

Field Detail

BAND_NOT_PRESENT

public static final float BAND_NOT_PRESENT
Equalizer setting to denote that a given band will not be present in the output signal.

PASS_THRU_EQ

public static final Equalizer PASS_THRU_EQ

Constructor Detail

Equalizer

public Equalizer()
Creates a new Equalizer instance.

Equalizer

public Equalizer(float[] settings)

Equalizer

public Equalizer(Equalizer.EQFunction eq)

Method Detail

getBand

public float getBand(int band)
Retrieves the eq setting for a given band.

getBandCount

public int getBandCount()
Retrieves the number of bands present in this equalizer.

reset

public void reset()
Sets all bands to 0.0

setBand

public float setBand(int band, float neweq)

setFrom

public void setFrom(float[] eq)

setFrom

public void setFrom(Equalizer.EQFunction eq)

setFrom

public void setFrom(Equalizer eq)
Sets the bands of this equalizer to the value the bands of another equalizer. Bands that are not present in both equalizers are ignored.
JavaZOOM 1999-2005