android.media.audiofx
Class Equalizer

java.lang.Object
  extended by android.media.audiofx.AudioEffect
      extended by android.media.audiofx.Equalizer

public class Equalizer
extends AudioEffect


Nested Class Summary
static interface Equalizer.OnParameterChangeListener
           
static class Equalizer.Settings
           
 
Nested classes/interfaces inherited from class android.media.audiofx.AudioEffect
AudioEffect.Descriptor, AudioEffect.OnControlStatusChangeListener, AudioEffect.OnEnableStatusChangeListener
 
Field Summary
static int PARAM_BAND_FREQ_RANGE
           
static int PARAM_BAND_LEVEL
           
static int PARAM_CENTER_FREQ
           
static int PARAM_CURRENT_PRESET
           
static int PARAM_GET_BAND
           
static int PARAM_GET_NUM_OF_PRESETS
           
static int PARAM_GET_PRESET_NAME
           
static int PARAM_LEVEL_RANGE
           
static int PARAM_NUM_BANDS
           
static int PARAM_STRING_SIZE_MAX
           
 
Fields inherited from class android.media.audiofx.AudioEffect
ACTION_CLOSE_AUDIO_EFFECT_CONTROL_SESSION, ACTION_DISPLAY_AUDIO_EFFECT_CONTROL_PANEL, ACTION_OPEN_AUDIO_EFFECT_CONTROL_SESSION, ALREADY_EXISTS, CONTENT_TYPE_GAME, CONTENT_TYPE_MOVIE, CONTENT_TYPE_MUSIC, CONTENT_TYPE_VOICE, EFFECT_AUXILIARY, EFFECT_INSERT, ERROR, ERROR_BAD_VALUE, ERROR_DEAD_OBJECT, ERROR_INVALID_OPERATION, ERROR_NO_INIT, ERROR_NO_MEMORY, EXTRA_AUDIO_SESSION, EXTRA_CONTENT_TYPE, EXTRA_PACKAGE_NAME, SUCCESS
 
Constructor Summary
Equalizer(int priority, int audioSession)
           
 
Method Summary
 short getBand(int frequency)
           
 int[] getBandFreqRange(short band)
           
 short getBandLevel(short band)
           
 short[] getBandLevelRange()
           
 int getCenterFreq(short band)
           
 short getCurrentPreset()
           
 short getNumberOfBands()
           
 short getNumberOfPresets()
           
 String getPresetName(short preset)
           
 Equalizer.Settings getProperties()
           
 void setBandLevel(short band, short level)
           
 void setParameterListener(Equalizer.OnParameterChangeListener listener)
           
 void setProperties(Equalizer.Settings settings)
           
 void usePreset(short preset)
           
 
Methods inherited from class android.media.audiofx.AudioEffect
finalize, getDescriptor, getEnabled, getId, hasControl, queryEffects, release, setControlStatusListener, setEnabled, setEnableStatusListener
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAM_NUM_BANDS

public static final int PARAM_NUM_BANDS
See Also:
Constant Field Values

PARAM_LEVEL_RANGE

public static final int PARAM_LEVEL_RANGE
See Also:
Constant Field Values

PARAM_BAND_LEVEL

public static final int PARAM_BAND_LEVEL
See Also:
Constant Field Values

PARAM_CENTER_FREQ

public static final int PARAM_CENTER_FREQ
See Also:
Constant Field Values

PARAM_BAND_FREQ_RANGE

public static final int PARAM_BAND_FREQ_RANGE
See Also:
Constant Field Values

PARAM_GET_BAND

public static final int PARAM_GET_BAND
See Also:
Constant Field Values

PARAM_CURRENT_PRESET

public static final int PARAM_CURRENT_PRESET
See Also:
Constant Field Values

PARAM_GET_NUM_OF_PRESETS

public static final int PARAM_GET_NUM_OF_PRESETS
See Also:
Constant Field Values

PARAM_GET_PRESET_NAME

public static final int PARAM_GET_PRESET_NAME
See Also:
Constant Field Values

PARAM_STRING_SIZE_MAX

public static final int PARAM_STRING_SIZE_MAX
See Also:
Constant Field Values
Constructor Detail

Equalizer

public Equalizer(int priority,
                 int audioSession)
          throws IllegalStateException,
                 IllegalArgumentException,
                 UnsupportedOperationException,
                 RuntimeException
Throws:
IllegalStateException
IllegalArgumentException
UnsupportedOperationException
RuntimeException
Method Detail

getNumberOfBands

public short getNumberOfBands()
                       throws IllegalStateException,
                              IllegalArgumentException,
                              UnsupportedOperationException
Throws:
IllegalStateException
IllegalArgumentException
UnsupportedOperationException

getBandLevelRange

public short[] getBandLevelRange()
                          throws IllegalStateException,
                                 IllegalArgumentException,
                                 UnsupportedOperationException
Throws:
IllegalStateException
IllegalArgumentException
UnsupportedOperationException

setBandLevel

public void setBandLevel(short band,
                         short level)
                  throws IllegalStateException,
                         IllegalArgumentException,
                         UnsupportedOperationException
Throws:
IllegalStateException
IllegalArgumentException
UnsupportedOperationException

getBandLevel

public short getBandLevel(short band)
                   throws IllegalStateException,
                          IllegalArgumentException,
                          UnsupportedOperationException
Throws:
IllegalStateException
IllegalArgumentException
UnsupportedOperationException

getCenterFreq

public int getCenterFreq(short band)
                  throws IllegalStateException,
                         IllegalArgumentException,
                         UnsupportedOperationException
Throws:
IllegalStateException
IllegalArgumentException
UnsupportedOperationException

getBandFreqRange

public int[] getBandFreqRange(short band)
                       throws IllegalStateException,
                              IllegalArgumentException,
                              UnsupportedOperationException
Throws:
IllegalStateException
IllegalArgumentException
UnsupportedOperationException

getBand

public short getBand(int frequency)
              throws IllegalStateException,
                     IllegalArgumentException,
                     UnsupportedOperationException
Throws:
IllegalStateException
IllegalArgumentException
UnsupportedOperationException

getCurrentPreset

public short getCurrentPreset()
                       throws IllegalStateException,
                              IllegalArgumentException,
                              UnsupportedOperationException
Throws:
IllegalStateException
IllegalArgumentException
UnsupportedOperationException

usePreset

public void usePreset(short preset)
               throws IllegalStateException,
                      IllegalArgumentException,
                      UnsupportedOperationException
Throws:
IllegalStateException
IllegalArgumentException
UnsupportedOperationException

getNumberOfPresets

public short getNumberOfPresets()
                         throws IllegalStateException,
                                IllegalArgumentException,
                                UnsupportedOperationException
Throws:
IllegalStateException
IllegalArgumentException
UnsupportedOperationException

getPresetName

public String getPresetName(short preset)

setParameterListener

public void setParameterListener(Equalizer.OnParameterChangeListener listener)

getProperties

public Equalizer.Settings getProperties()
                                 throws IllegalStateException,
                                        IllegalArgumentException,
                                        UnsupportedOperationException
Throws:
IllegalStateException
IllegalArgumentException
UnsupportedOperationException

setProperties

public void setProperties(Equalizer.Settings settings)
                   throws IllegalStateException,
                          IllegalArgumentException,
                          UnsupportedOperationException
Throws:
IllegalStateException
IllegalArgumentException
UnsupportedOperationException


Copyright © 2008-2012. All Rights Reserved.