| OpenAL Specification and Reference | ||
|---|---|---|
| <<< Previous | State and State Requests | Next >>> |
Samples usually use the entire dynamic range of the chosen format/encoding, independend of their real world intensity. In other words, a jet engine and a clockwork both will have samples with full amplitude. The application will then have to adjust Source GAIN accordingly to account for relative differences.
By default, Sources are attenuated by 6 dB for each doubling of distance, with 6dB per scaled distance 1 from the distance Sourcer. At a scaled distance of 2, the Listener will experience the Source at -12dB, at a distance of 4 it would be -18dB.
The effective attentuation of a Source depends on many factors, among which distance attenuation and source and Listener GAIN are only some of the contributing factors. Even if the source and Listener GAIN exceed 1 (amplification beyond the guaranteed dynamic range), distance and other attenuation might ultimately limit the overall GAIN to a value below 1.
Calculation of distance attenuation is controlled by using the Enable/Disable commands with the DISTANCE_ATTENUATION parameter, which can also be used with the IsEnabled query.
![]() | Annotation/ Extended Dynamic Range |
|---|---|
GL has problems with dynamic range expressed in clamped variables, found e.g. in the need for "overbright" lighting. The OpenAL implementation should not clamp intermediate values of effective gain to unit range. Any clamping, if necessary, should be applied at the last possible moment. In other words, GAIN>1 is perfectly valid as long as the implementation can clamp the value as needed for maximum mixing accuracy and to account for the actual dynamic range of the output device. |
| <<< Previous | Home | Next >>> |
| Units of Space: Distance Scale | Up | Sound Propagation Speed |