How the Check Works
The CheckAudioClipping
is designed to identify audio files in your project that may have samples above a certain clipping threshold. Clipping occurs when audio samples exceed the maximum limit, resulting in distorted sound when played. This usually happens when sounds are too loud.
Why is this important
- Audio Quality Assurance: To ensure that audio assets in your project do not contain samples that may cause clipping when played.
- Prevent Distorted Audio: Prevent audio distortion and maintain high-quality sound by identifying and addressing potential clipping issues.
How to Use the Check
You can customize the clipping threshold by adjusting the Clipping Threshold
attribute. This value represents the maximum allowed absolute sample value before clipping is detected. The default value for this is 0.98f
.
You can also set a tolerance for this error, e.g. if the audio file only goes above the Clipping Threshold
once, that might be okay. To allow for a little room of error, adjust the Clipping Tolerance
value.
How to fix this error
If you see this in your test results, you should check the corresponding audio file in an audio editing software and edit it to remove the clipping parts. There’s little that can be done from within Unity. Here’s a video that explains the situation: