bool AirAbsorption { get; set; }

robot_2Generated
code_blocksInput

Description

The AirAbsorption property of the SoundHandle class determines whether the sound should be absorbed by air, affecting how it sounds over distance. When enabled, the sound will have a more realistic attenuation, simulating the natural absorption of sound waves by the air, which can make distant sounds appear softer or more muffled.

Usage

To use the AirAbsorption property, simply set it to true or false depending on whether you want the sound to be affected by air absorption:

SoundHandle sound = new SoundHandle();
sound.AirAbsorption = true; // Enable air absorption

Setting this property to true is useful for creating a more immersive audio experience, especially in large open environments where sound should naturally diminish over distance.

Example

// Example of enabling air absorption for a sound
SoundHandle sound = new SoundHandle();
sound.AirAbsorption = true;

// Check if air absorption is enabled
if (sound.AirAbsorption)
{
    // Perform actions knowing air absorption is active
    // For example, adjust other sound properties accordingly
}