/**@class android.media.audiofx.Equalizer @extends android.media.audiofx.AudioEffect An Equalizer is used to alter the frequency response of a particular music source or of the main output mix. <p>An application creates an Equalizer object to instantiate and control an Equalizer engine in the audio framework. The application can either simply use predefined presets or have a more precise control of the gain in each frequency band controlled by the equalizer. <p>The methods, parameter types and units exposed by the Equalizer implementation are directly mapping those defined by the OpenSL ES 1.0.1 Specification (http://www.khronos.org/opensles/) for the SLEqualizerItf interface. Please refer to this specification for more details. <p>To attach the Equalizer to a particular AudioTrack or MediaPlayer, specify the audio session ID of this AudioTrack or MediaPlayer when constructing the Equalizer. <p>NOTE: attaching an Equalizer to the global audio output mix by use of session 0 is deprecated. <p>See {@link android.media.MediaPlayer#getAudioSessionId()} for details on audio sessions. <p>See {@link android.media.audiofx.AudioEffect} class for more details on controlling audio effects. */ var Equalizer = { /** Number of bands. Parameter ID for OnParameterChangeListener */ PARAM_NUM_BANDS : "0", /** Band level range. Parameter ID for OnParameterChangeListener */ PARAM_LEVEL_RANGE : "1", /** Band level. Parameter ID for OnParameterChangeListener */ PARAM_BAND_LEVEL : "2", /** Band center frequency. Parameter ID for OnParameterChangeListener */ PARAM_CENTER_FREQ : "3", /** Band frequency range. Parameter ID for {@link android.media.audiofx.Equalizer.OnParameterChangeListener} */ PARAM_BAND_FREQ_RANGE : "4", /** Band for a given frequency. Parameter ID for OnParameterChangeListener */ PARAM_GET_BAND : "5", /** Current preset. Parameter ID for OnParameterChangeListener */ PARAM_CURRENT_PRESET : "6", /** Request number of presets. Parameter ID for OnParameterChangeListener */ PARAM_GET_NUM_OF_PRESETS : "7", /** Request preset name. Parameter ID for OnParameterChangeListener */ PARAM_GET_PRESET_NAME : "8", /** Maximum size for preset name */ PARAM_STRING_SIZE_MAX : "32", /**Gets the number of frequency bands supported by the Equalizer engine. @return {Number} the number of bands @throws IllegalStateException @throws IllegalArgumentException @throws UnsupportedOperationException */ getNumberOfBands : function( ) {}, /**Gets the level range for use by {@link #setBandLevel(short,short)}. The level is expressed in milliBel. @return {Number} the band level range in an array of short integers. The first element is the lower limit of the range, the second element the upper limit. @throws IllegalStateException @throws IllegalArgumentException @throws UnsupportedOperationException */ getBandLevelRange : function( ) {}, /**Sets the given equalizer band to the given gain value. @param {Number} band frequency band that will have the new gain. The numbering of the bands starts from 0 and ends at (number of bands - 1). @param {Number} level new gain in millibels that will be set to the given band. getBandLevelRange() will define the maximum and minimum values. @throws IllegalStateException @throws IllegalArgumentException @throws UnsupportedOperationException @see #getNumberOfBands() */ setBandLevel : function( ) {}, /**Gets the gain set for the given equalizer band. @param {Number} band frequency band whose gain is requested. The numbering of the bands starts from 0 and ends at (number of bands - 1). @return {Number} the gain in millibels of the given band. @throws IllegalStateException @throws IllegalArgumentException @throws UnsupportedOperationException */ getBandLevel : function( ) {}, /**Gets the center frequency of the given band. @param {Number} band frequency band whose center frequency is requested. The numbering of the bands starts from 0 and ends at (number of bands - 1). @return {Number} the center frequency in milliHertz @throws IllegalStateException @throws IllegalArgumentException @throws UnsupportedOperationException */ getCenterFreq : function( ) {}, /**Gets the frequency range of the given frequency band. @param {Number} band frequency band whose frequency range is requested. The numbering of the bands starts from 0 and ends at (number of bands - 1). @return {Number} the frequency range in millHertz in an array of integers. The first element is the lower limit of the range, the second element the upper limit. @throws IllegalStateException @throws IllegalArgumentException @throws UnsupportedOperationException */ getBandFreqRange : function( ) {}, /**Gets the band that has the most effect on the given frequency. @param {Number} frequency frequency in milliHertz which is to be equalized via the returned band. @return {Number} the frequency band that has most effect on the given frequency. @throws IllegalStateException @throws IllegalArgumentException @throws UnsupportedOperationException */ getBand : function( ) {}, /**Gets current preset. @return {Number} the preset that is set at the moment. @throws IllegalStateException @throws IllegalArgumentException @throws UnsupportedOperationException */ getCurrentPreset : function( ) {}, /**Sets the equalizer according to the given preset. @param {Number} preset new preset that will be taken into use. The valid range is [0, number of presets-1]. @throws IllegalStateException @throws IllegalArgumentException @throws UnsupportedOperationException @see #getNumberOfPresets() */ usePreset : function( ) {}, /**Gets the total number of presets the equalizer supports. The presets will have indices [0, number of presets-1]. @return {Number} the number of presets the equalizer supports. @throws IllegalStateException @throws IllegalArgumentException @throws UnsupportedOperationException */ getNumberOfPresets : function( ) {}, /**Gets the preset name based on the index. @param {Number} preset index of the preset. The valid range is [0, number of presets-1]. @return {String} a string containing the name of the given preset. @throws IllegalStateException @throws IllegalArgumentException @throws UnsupportedOperationException */ getPresetName : function( ) {}, /**Registers an OnParameterChangeListener interface. @param {Object {Equalizer.OnParameterChangeListener}} listener OnParameterChangeListener interface registered */ setParameterListener : function( ) {}, /**Gets the equalizer properties. This method is useful when a snapshot of current equalizer settings must be saved by the application. @return {Object {android.media.audiofx.Equalizer.Settings}} an Equalizer.Settings object containing all current parameters values @throws IllegalStateException @throws IllegalArgumentException @throws UnsupportedOperationException */ getProperties : function( ) {}, /**Sets the equalizer properties. This method is useful when equalizer settings have to be applied from a previous backup. @param {Object {Equalizer.Settings}} settings an Equalizer.Settings object containing the properties to apply @throws IllegalStateException @throws IllegalArgumentException @throws UnsupportedOperationException */ setProperties : function( ) {}, };