# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Nested Classes | Constants | Inherited Constants | Inherited Fields | Ctors | Methods | Inherited Methods

# EnvironmentalReverb

`public class EnvironmentalReverb`
`` `extends AudioEffect` ``

java.lang.Object
↳ | android.media.audiofx.AudioEffect
| ↳ | android.media.audiofx.EnvironmentalReverb

A sound generated within a room travels in many directions. The listener first hears the direct sound from the source itself. Later, he or she hears discrete echoes caused by sound bouncing off nearby walls, the ceiling and the floor. As sound waves arrive after undergoing more and more reflections, individual reflections become indistinguishable and the listener hears continuous reverberation that decays over time. Reverb is vital for modeling a listener's environment. It can be used in music applications to simulate music being played back in various environments, or in games to immerse the listener within the game's environment. The EnvironmentalReverb class allows an application to control each reverb engine property in a global reverb environment and is more suitable for games. For basic control, more suitable for music applications, it is recommended to use the `PresetReverb` class.

An application creates a EnvironmentalReverb object to instantiate and control a reverb engine in the audio framework.

The methods, parameter types and units exposed by the EnvironmentalReverb implementation are directly mapping those defined by the OpenSL ES 1.0.1 Specification (http://www.khronos.org/opensles/) for the SLEnvironmentalReverbItf interface. Please refer to this specification for more details.

The EnvironmentalReverb is an output mix auxiliary effect and should be created on Audio session 0. In order for a MediaPlayer or AudioTrack to be fed into this effect, they must be explicitely attached to it and a send level must be specified. Use the effect ID returned by getId() method to designate this particular effect when attaching it to the MediaPlayer or AudioTrack.

Creating a reverb on the output mix (audio session 0) requires permission `Manifest.permission.MODIFY_AUDIO_SETTINGS`

See `AudioEffect` class for more details on controlling audio effects.

## Summary

### Nested classes
`interface` | `EnvironmentalReverb.OnParameterChangeListener` The OnParameterChangeListener interface defines a method called by the EnvironmentalReverb when a parameter value has changed.
`class` | `EnvironmentalReverb.Settings` The Settings class regroups all environmental reverb parameters.

### Constants
`int` | `PARAM_DECAY_HF_RATIO` Decay HF ratio.
`int` | `PARAM_DECAY_TIME` Decay time.
`int` | `PARAM_DENSITY` Density.
`int` | `PARAM_DIFFUSION` Diffusion.
`int` | `PARAM_REFLECTIONS_DELAY` Early reflections delay.
`int` | `PARAM_REFLECTIONS_LEVEL` Early reflections level.
`int` | `PARAM_REVERB_DELAY` Reverb delay.
`int` | `PARAM_REVERB_LEVEL` Reverb level.
`int` | `PARAM_ROOM_HF_LEVEL` Room HF level.
`int` | `PARAM_ROOM_LEVEL` Room level.

### Inherited constants
From class `android.media.audiofx.AudioEffect`
`String` | `ACTION_CLOSE_AUDIO_EFFECT_CONTROL_SESSION` Intent to signal to the effect control application or service that an audio session is closed and that effects should not be applied anymore.
`String` | `ACTION_DISPLAY_AUDIO_EFFECT_CONTROL_PANEL` Intent to launch an audio effect control panel UI.
`String` | `ACTION_OPEN_AUDIO_EFFECT_CONTROL_SESSION` Intent to signal to the effect control application or service that a new audio session is opened and requires audio effects to be applied.
`int` | `ALREADY_EXISTS` Internal operation status.
`int` | `CONTENT_TYPE_GAME` Value for `EXTRA_CONTENT_TYPE` when the type of content played is game audio
`int` | `CONTENT_TYPE_MOVIE` Value for `EXTRA_CONTENT_TYPE` when the type of content played is video or movie
`int` | `CONTENT_TYPE_MUSIC` Value for `EXTRA_CONTENT_TYPE` when the type of content played is music
`int` | `CONTENT_TYPE_VOICE` Value for `EXTRA_CONTENT_TYPE` when the type of content played is voice audio
`String` | `EFFECT_AUXILIARY` Effect connection mode is auxiliary.
`String` | `EFFECT_INSERT` Effect connection mode is insert.
`String` | `EFFECT_POST_PROCESSING` Effect connection mode is post processing.
`String` | `EFFECT_PRE_PROCESSING` Effect connection mode is pre processing.
`int` | `ERROR` Unspecified error.
`int` | `ERROR_BAD_VALUE` Operation failed due to bad parameter value.
`int` | `ERROR_DEAD_OBJECT` Operation failed due to dead remote object.
`int` | `ERROR_INVALID_OPERATION` Operation failed because it was requested in wrong state.
`int` | `ERROR_NO_INIT` Operation failed due to bad object initialization.
`int` | `ERROR_NO_MEMORY` Operation failed due to lack of memory.
`String` | `EXTRA_AUDIO_SESSION` Contains the ID of the audio session the effects should be applied to.
`String` | `EXTRA_CONTENT_TYPE` Indicates which type of content is played by the application.
`String` | `EXTRA_PACKAGE_NAME` Contains the package name of the calling application.
`int` | `SUCCESS` Successful operation.

### Inherited fields
From class `android.media.audiofx.AudioEffect`
`public static final UUID` | `EFFECT_TYPE_AEC` UUID for Acoustic Echo Canceler (AEC)
`public static final UUID` | `EFFECT_TYPE_AGC` UUID for Automatic Gain Control (AGC)
`public static final UUID` | `EFFECT_TYPE_BASS_BOOST` UUID for bass boost effect
`public static final UUID` | `EFFECT_TYPE_DYNAMICS_PROCESSING` UUID for Dynamics Processing
`public static final UUID` | `EFFECT_TYPE_ENV_REVERB` UUID for environmental reverberation effect
`public static final UUID` | `EFFECT_TYPE_EQUALIZER` UUID for equalizer effect
`public static final UUID` | `EFFECT_TYPE_HAPTIC_GENERATOR` UUID for Haptic Generator.
`public static final UUID` | `EFFECT_TYPE_LOUDNESS_ENHANCER` UUID for Loudness Enhancer
`public static final UUID` | `EFFECT_TYPE_NS` UUID for Noise Suppressor (NS)
`public static final UUID` | `EFFECT_TYPE_PRESET_REVERB` UUID for preset reverberation effect
`public static final UUID` | `EFFECT_TYPE_VIRTUALIZER` UUID for virtualizer effect

### Public constructors
`EnvironmentalReverb(int priority, int audioSession)` Class constructor.

### Public methods
`short` | `getDecayHFRatio()` Gets the ratio of high frequency decay time (at 5 kHz) relative to low frequencies.
`int` | `getDecayTime()` Gets the decay time.
`short` | `getDensity()` Gets the density level.
`short` | `getDiffusion()` Gets diffusion level.
`EnvironmentalReverb.Settings` | `getProperties()` Gets the environmental reverb properties.
`int` | `getReflectionsDelay()` Gets the reflections delay.
`short` | `getReflectionsLevel()` Gets the volume level of the early reflections.
`int` | `getReverbDelay()` Gets the reverb delay.
`short` | `getReverbLevel()` Gets the reverb level.
`short` | `getRoomHFLevel()` Gets the room HF level.
`short` | `getRoomLevel()` Gets the master volume level of the environmental reverb effect.
`void` | `setDecayHFRatio(short decayHFRatio)` Sets the ratio of high frequency decay time (at 5 kHz) relative to the decay time at low frequencies.
`void` | `setDecayTime(int decayTime)` Sets the time taken for the level of reverberation to decay by 60 dB.
`void` | `setDensity(short density)` Controls the modal density of the late reverberation decay.
`void` | `setDiffusion(short diffusion)` Sets the echo density in the late reverberation decay.
`void` | `setParameterListener(EnvironmentalReverb.OnParameterChangeListener listener)` Registers an OnParameterChangeListener interface.
`void` | `setProperties(EnvironmentalReverb.Settings settings)` Sets the environmental reverb properties.
`void` | `setReflectionsDelay(int reflectionsDelay)` Sets the delay time for the early reflections.
`void` | `setReflectionsLevel(short reflectionsLevel)` Sets the volume level of the early reflections.
`void` | `setReverbDelay(int reverbDelay)` Sets the time between the first reflection and the reverberation.
`void` | `setReverbLevel(short reverbLevel)` Sets the volume level of the late reverberation.
`void` | `setRoomHFLevel(short roomHF)` Sets the volume level at 5 kHz relative to the volume level at low frequencies of the overall reverb effect.
`void` | `setRoomLevel(short room)` Sets the master volume level of the environmental reverb effect.

### Inherited methods
From class `android.media.audiofx.AudioEffect`
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`AudioEffect.Descriptor` | `getDescriptor()` Get the effect descriptor.
`boolean` | `getEnabled()` Returns effect enabled state
`int` | `getId()` Returns effect unique identifier.
`boolean` | `hasControl()` Checks if this AudioEffect object is controlling the effect engine.
`static Descriptor[]` | `queryEffects()` Query all effects available on the platform.
`void` | `release()` Releases the native AudioEffect resources.
`void` | `setControlStatusListener(AudioEffect.OnControlStatusChangeListener listener)` Sets the listener AudioEffect notifies when the effect engine control is taken or returned.
`void` | `setEnableStatusListener(AudioEffect.OnEnableStatusChangeListener listener)` Sets the listener AudioEffect notifies when the effect engine is enabled or disabled.
`int` | `setEnabled(boolean enabled)` Enable or disable the effect.
From class `java.lang.Object`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.

## Constants

### PARAM_DECAY_HF_RATIO

    public static final int PARAM_DECAY_HF_RATIO

Decay HF ratio. Parameter ID for `EnvironmentalReverb.OnParameterChangeListener`

Constant Value: 3 (0x00000003)

### PARAM_DECAY_TIME

    public static final int PARAM_DECAY_TIME

Decay time. Parameter ID for OnParameterChangeListener

Constant Value: 2 (0x00000002)

### PARAM_DENSITY

    public static final int PARAM_DENSITY

Density. Parameter ID for OnParameterChangeListener

Constant Value: 9 (0x00000009)

### PARAM_DIFFUSION

    public static final int PARAM_DIFFUSION

Diffusion. Parameter ID for OnParameterChangeListener

Constant Value: 8 (0x00000008)

### PARAM_REFLECTIONS_DELAY

    public static final int PARAM_REFLECTIONS_DELAY

Early reflections delay. Parameter ID for OnParameterChangeListener

Constant Value: 5 (0x00000005)

### PARAM_REFLECTIONS_LEVEL

    public static final int PARAM_REFLECTIONS_LEVEL

Early reflections level. Parameter ID for OnParameterChangeListener

Constant Value: 4 (0x00000004)

### PARAM_REVERB_DELAY

    public static final int PARAM_REVERB_DELAY

Reverb delay. Parameter ID for OnParameterChangeListener

Constant Value: 7 (0x00000007)

### PARAM_REVERB_LEVEL

    public static final int PARAM_REVERB_LEVEL

Reverb level. Parameter ID for OnParameterChangeListener

Constant Value: 6 (0x00000006)

### PARAM_ROOM_HF_LEVEL

    public static final int PARAM_ROOM_HF_LEVEL

Room HF level. Parameter ID for OnParameterChangeListener

Constant Value: 1 (0x00000001)

### PARAM_ROOM_LEVEL

    public static final int PARAM_ROOM_LEVEL

Room level. Parameter ID for OnParameterChangeListener

Constant Value: 0 (0x00000000)

## Public constructors

### EnvironmentalReverb

    public EnvironmentalReverb (int priority,
                    int audioSession)

Class constructor.

Parameters
`priority` | `int`: the priority level requested by the application for controlling the EnvironmentalReverb engine. As the same engine can be shared by several applications, this parameter indicates how much the requesting application needs control of effect parameters. The normal priority is 0, above normal is a positive number, below normal a negative number.
`audioSession` | `int`: system wide unique audio session identifier. If audioSession is not 0, the EnvironmentalReverb will be attached to the MediaPlayer or AudioTrack in the same audio session. Otherwise, the EnvironmentalReverb will apply to the output mix. As the EnvironmentalReverb is an auxiliary effect it is recommended to instantiate it on audio session 0 and to attach it to the MediaPLayer auxiliary output.

Throws
`` | java.lang.IllegalArgumentException
`` | java.lang.UnsupportedOperationException
`` | java.lang.RuntimeException
`IllegalArgumentException` |
`RuntimeException` |
`UnsupportedOperationException` |

## Public methods

### getDecayHFRatio

    public short getDecayHFRatio ()

Gets the ratio of high frequency decay time (at 5 kHz) relative to low frequencies.

Returns
`short` | the decay HF ration. See `setDecayHFRatio(short)` for units.

Throws
`` | java.lang.IllegalStateException
`` | java.lang.IllegalArgumentException
`` | java.lang.UnsupportedOperationException
`IllegalArgumentException` |
`IllegalStateException` |
`UnsupportedOperationException` |

### getDecayTime

    public int getDecayTime ()

Gets the decay time.

Returns
`int` | the decay time in milliseconds.

Throws
`` | java.lang.IllegalStateException
`` | java.lang.IllegalArgumentException
`` | java.lang.UnsupportedOperationException
`IllegalArgumentException` |
`IllegalStateException` |
`UnsupportedOperationException` |

### getDensity

    public short getDensity ()

Gets the density level.

Returns
`short` | the density level. See `setDiffusion(short)` for units.

Throws
`` | java.lang.IllegalStateException
`` | java.lang.IllegalArgumentException
`` | java.lang.UnsupportedOperationException
`IllegalArgumentException` |
`IllegalStateException` |
`UnsupportedOperationException` |

### getDiffusion

    public short getDiffusion ()

Gets diffusion level.

Returns
`short` | the diffusion level. See `setDiffusion(short)` for units.

Throws
`` | java.lang.IllegalStateException
`` | java.lang.IllegalArgumentException
`` | java.lang.UnsupportedOperationException
`IllegalArgumentException` |
`IllegalStateException` |
`UnsupportedOperationException` |

### getProperties

    public EnvironmentalReverb.Settings getProperties ()

Gets the environmental reverb properties. This method is useful when a snapshot of current reverb settings must be saved by the application.

Returns
`EnvironmentalReverb.Settings` | an EnvironmentalReverb.Settings object containing all current parameters values

Throws
`` | java.lang.IllegalStateException
`` | java.lang.IllegalArgumentException
`` | java.lang.UnsupportedOperationException
`IllegalArgumentException` |
`IllegalStateException` |
`UnsupportedOperationException` |

### getReflectionsDelay

    public int getReflectionsDelay ()

Gets the reflections delay.

Returns
`int` | the early reflections delay in milliseconds.

Throws
`` | java.lang.IllegalStateException
`` | java.lang.IllegalArgumentException
`` | java.lang.UnsupportedOperationException
`IllegalArgumentException` |
`IllegalStateException` |
`UnsupportedOperationException` |

### getReflectionsLevel

    public short getReflectionsLevel ()

Gets the volume level of the early reflections.

Returns
`short` | the early reflections level in millibels.

Throws
`` | java.lang.IllegalStateException
`` | java.lang.IllegalArgumentException
`` | java.lang.UnsupportedOperationException
`IllegalArgumentException` |
`IllegalStateException` |
`UnsupportedOperationException` |

### getReverbDelay

    public int getReverbDelay ()

Gets the reverb delay.

Returns
`int` | the reverb delay in milliseconds.

Throws
`` | java.lang.IllegalStateException
`` | java.lang.IllegalArgumentException
`` | java.lang.UnsupportedOperationException
`IllegalArgumentException` |
`IllegalStateException` |
`UnsupportedOperationException` |

### getReverbLevel

    public short getReverbLevel ()

Gets the reverb level.

Returns
`short` | the reverb level in millibels.

Throws
`` | java.lang.IllegalStateException
`` | java.lang.IllegalArgumentException
`` | java.lang.UnsupportedOperationException
`IllegalArgumentException` |
`IllegalStateException` |
`UnsupportedOperationException` |

### getRoomHFLevel

    public short getRoomHFLevel ()

Gets the room HF level.

Returns
`short` | the room HF level in millibels.

Throws
`` | java.lang.IllegalStateException
`` | java.lang.IllegalArgumentException
`` | java.lang.UnsupportedOperationException
`IllegalArgumentException` |
`IllegalStateException` |
`UnsupportedOperationException` |

### getRoomLevel

    public short getRoomLevel ()

Gets the master volume level of the environmental reverb effect.

Returns
`short` | the room level in millibels.

Throws
`` | java.lang.IllegalStateException
`` | java.lang.IllegalArgumentException
`` | java.lang.UnsupportedOperationException
`IllegalArgumentException` |
`IllegalStateException` |
`UnsupportedOperationException` |

### setDecayHFRatio

    public void setDecayHFRatio (short decayHFRatio)

Sets the ratio of high frequency decay time (at 5 kHz) relative to the decay time at low frequencies.

Parameters
`decayHFRatio` | `short`: high frequency decay ratio using a permille scale. The valid range is [100, 2000]. A ratio of 1000 indicates that all frequencies decay at the same rate.

Throws
`` | java.lang.IllegalStateException
`` | java.lang.IllegalArgumentException
`` | java.lang.UnsupportedOperationException
`IllegalArgumentException` |
`IllegalStateException` |
`UnsupportedOperationException` |

### setDecayTime

    public void setDecayTime (int decayTime)

Sets the time taken for the level of reverberation to decay by 60 dB.

Parameters
`decayTime` | `int`: decay time in milliseconds. The valid range is [100, 20000].

Throws
`` | java.lang.IllegalStateException
`` | java.lang.IllegalArgumentException
`` | java.lang.UnsupportedOperationException
`IllegalArgumentException` |
`IllegalStateException` |
`UnsupportedOperationException` |

### setDensity

    public void setDensity (short density)

Controls the modal density of the late reverberation decay.

The scale should approximately map linearly to the perceived change in reverberation. A lower density creates a hollow sound that is useful for simulating small reverberation spaces such as bathrooms.

Parameters
`density` | `short`: density specified using a permille scale. The valid range is [0, 1000]. A value of 1000 o/oo indicates a natural sounding reverberation. Values below this level produce a more colored effect.

Throws
`` | java.lang.IllegalStateException
`` | java.lang.IllegalArgumentException
`` | java.lang.UnsupportedOperationException
`IllegalArgumentException` |
`IllegalStateException` |
`UnsupportedOperationException` |

### setDiffusion

    public void setDiffusion (short diffusion)

Sets the echo density in the late reverberation decay.

The scale should approximately map linearly to the perceived change in reverberation.

Parameters
`diffusion` | `short`: diffusion specified using a permille scale. The diffusion valid range is [0, 1000]. A value of 1000 o/oo indicates a smooth reverberation decay. Values below this level give a more grainy character.

Throws
`` | java.lang.IllegalStateException
`` | java.lang.IllegalArgumentException
`` | java.lang.UnsupportedOperationException
`IllegalArgumentException` |
`IllegalStateException` |
`UnsupportedOperationException` |

### setParameterListener

    public void setParameterListener (EnvironmentalReverb.OnParameterChangeListener listener)

Registers an OnParameterChangeListener interface.

Parameters
`listener` | `EnvironmentalReverb.OnParameterChangeListener`: OnParameterChangeListener interface registered

### setProperties

    public void setProperties (EnvironmentalReverb.Settings settings)

Sets the environmental reverb properties. This method is useful when reverb settings have to be applied from a previous backup.

Parameters
`settings` | `EnvironmentalReverb.Settings`: a EnvironmentalReverb.Settings object containing the properties to apply

Throws
`` | java.lang.IllegalStateException
`` | java.lang.IllegalArgumentException
`` | java.lang.UnsupportedOperationException
`IllegalArgumentException` |
`IllegalStateException` |
`UnsupportedOperationException` |

### setReflectionsDelay

    public void setReflectionsDelay (int reflectionsDelay)

Sets the delay time for the early reflections.

This method sets the time between when the direct path is heard and when the first reflection is heard.

Parameters
`reflectionsDelay` | `int`: reflections delay in milliseconds. The valid range is [0, 300].

Throws
`` | java.lang.IllegalStateException
`` | java.lang.IllegalArgumentException
`` | java.lang.UnsupportedOperationException
`IllegalArgumentException` |
`IllegalStateException` |
`UnsupportedOperationException` |

### setReflectionsLevel

    public void setReflectionsLevel (short reflectionsLevel)

Sets the volume level of the early reflections.

This level is combined with the overall room level (set using `setRoomLevel(short)`).

Parameters
`reflectionsLevel` | `short`: reflection level in millibels. The valid range is [-9000, 1000].

Throws
`` | java.lang.IllegalStateException
`` | java.lang.IllegalArgumentException
`` | java.lang.UnsupportedOperationException
`IllegalArgumentException` |
`IllegalStateException` |
`UnsupportedOperationException` |

### setReverbDelay

    public void setReverbDelay (int reverbDelay)

Sets the time between the first reflection and the reverberation.

Parameters
`reverbDelay` | `int`: reverb delay in milliseconds. The valid range is [0, 100].

Throws
`` | java.lang.IllegalStateException
`` | java.lang.IllegalArgumentException
`` | java.lang.UnsupportedOperationException
`IllegalArgumentException` |
`IllegalStateException` |
`UnsupportedOperationException` |

### setReverbLevel

    public void setReverbLevel (short reverbLevel)

Sets the volume level of the late reverberation.

This level is combined with the overall room level (set using `setRoomLevel(short)`).

Parameters
`reverbLevel` | `short`: reverb level in millibels. The valid range is [-9000, 2000].

Throws
`` | java.lang.IllegalStateException
`` | java.lang.IllegalArgumentException
`` | java.lang.UnsupportedOperationException
`IllegalArgumentException` |
`IllegalStateException` |
`UnsupportedOperationException` |

### setRoomHFLevel

    public void setRoomHFLevel (short roomHF)

Sets the volume level at 5 kHz relative to the volume level at low frequencies of the overall reverb effect.

This controls a low-pass filter that will reduce the level of the high-frequency.

Parameters
`roomHF` | `short`: high frequency attenuation level in millibels. The valid range is [-9000, 0].

Throws
`` | java.lang.IllegalStateException
`` | java.lang.IllegalArgumentException
`` | java.lang.UnsupportedOperationException
`IllegalArgumentException` |
`IllegalStateException` |
`UnsupportedOperationException` |

### setRoomLevel

    public void setRoomLevel (short room)

Sets the master volume level of the environmental reverb effect.

Parameters
`room` | `short`: room level in millibels. The valid range is [-9000, 0].

Throws
`` | java.lang.IllegalStateException
`` | java.lang.IllegalArgumentException
`` | java.lang.UnsupportedOperationException
`IllegalArgumentException` |
`IllegalStateException` |
`UnsupportedOperationException` |

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*