javazoom.jl.decoder
Class Equalizer

java.lang.Object
  extended by javazoom.jl.decoder.Equalizer

public final class Equalizer
extends java.lang.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:
Decoder

Nested Class Summary
static class Equalizer.EQFunction
           
 
Field Summary
static float BAND_NOT_PRESENT
          Equalizer setting to denote that a given band will not be present in the output signal.
static Equalizer PASS_THRU_EQ
           
 
Constructor Summary
Equalizer()
          Creates a new Equalizer instance.
Equalizer(Equalizer.EQFunction eq)
           
Equalizer(float[] settings)
           
 
Method Summary
 float getBand(int band)
          Retrieves the eq setting for a given band.
 int getBandCount()
          Retrieves the number of bands present in this equalizer.
 void reset()
          Sets all bands to 0.0
 float setBand(int band, float neweq)
           
 void setFrom(Equalizer.EQFunction eq)
           
 void setFrom(Equalizer eq)
          Sets the bands of this equalizer to the value the bands of another equalizer.
 void setFrom(float[] eq)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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.

See Also:
Constant Field Values

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

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.


reset

public void reset()
Sets all bands to 0.0


getBandCount

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


setBand

public float setBand(int band,
                     float neweq)

getBand

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



JavaZOOM 1999-2008