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 as it travels through the air, simulating the natural absorption of sound waves by the atmosphere.
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 soundHandle = new SoundHandle();
soundHandle.AirAbsorption = true; // Enable air absorption
Example
// Example of enabling air absorption for a sound
SoundHandle soundHandle = new SoundHandle();
soundHandle.AirAbsorption = true;
// Check if air absorption is enabled
if (soundHandle.AirAbsorption)
{
// Perform actions knowing air absorption is active
// e.g., adjust other sound properties accordingly
}