Environmental Reverberation
DirectX provides partial support for environmental reverberation in accordance with the Interactive 3D Audio Level 2 (I3DL2) specification, published by the Interactive Audio Special Interest Group. The DirectX environmental reverb effect is an implementation of the listener properties in the I3DL2 specification. Source properties are not supported.
Sounds reaching the listener have three temporal components:
- The direct path is the audio signal that goes straight from the sound source to the listener, without bouncing off any surface.
- Early reflections are the audio signals that reach the listener after one or two reflections off surfaces such as the walls, floor, and ceiling. If a signal is the result of the sound hitting only one wall on its way to the listener, it is called a first-order reflection. If it bounces off two walls before reaching the listener, it is called a second-order reflection. Humans can typically perceive individual reflections only of the first or second order.
- Late reverberation, or simply reverb, consists of the combined lower-order reflections, usually a dense succession of echoes of diminishing intensity.
The combination of early reflections and late reverberation is sometimes called the room effect.
In the DirectSound implementation, only the signal sent to the room effect is heard. To hear the direct path, play the sound simultaneously in another buffer that does not have the environmental reverb effect.
Reverberation properties include the following:
- Attenuation of the early reflections and late reverberation.
- Rolloff factor, or the rate at which reflected signals become attenuated with distance. The rolloff factor for the direct path is managed by the DirectSound listener.
- Reflections delay. This is the interval between the arrival of the direct-path signals and the arrival of the first early reflections.
- Reverb delay. This is the interval between the first of the early reflections and the onset of late reverberation.
- Decay time. This is the interval between the onset of late reverberation and the time when its intensity has been reduced by 60 dB.
- Diffusion, which is proportional to the number of echos per second in the late reverberation. Depending on the implementation, the density of echos can change as the reverberation decays. In DirectX, the application can control this property by setting a percentage of the range allowed by the implementation.
- Density, which is is proportional to the number of resonances per hertz in the late reverberation. Lower densities produce hollower sounds like those found in small rooms. In DirectX, the application can control this property by setting a percentage of the range allowed by the implementation.
Reverb properties are represented by an IDirectSoundFXI3DL2Reverb8 interface, and the parameters of the environment are contained in a DSFXI3DL2Reverb structure.
DirectX supports many sets of default parameters, or presets, that describe the reverb properties of audio environments ranging from mountains to sewer pipes. Most applications can simply choose one of these environments by using IDirectSoundFXI3DL2Reverb8::SetPreset.
To set custom properties, use IDirectSoundFXI3DL2Reverb8::SetAllParameters. You can retrieve the current properties by using IDirectSoundFXI3DL2Reverb8::GetAllParameters.