In this lesson, you will learn how to apply final gain staging and limiting techniques to ensure your game sounds professional and consistent across all playback devices.
The Goal of Final Mix Consistency
Even with a well-structured Audio Mixer, your game might sound too quiet on a mobile speaker or dangerously loud through high-end headphones. Balancing for consistent output means ensuring your total signal doesn't distort (clipping) while maintaining a high enough "perceived loudness" so the player doesn't have to constantly adjust their device volume.
Applying Gain Staging
Gain staging is the practice of managing the signal level at every step of your Audio Mixer. Think of it like a chain: if you turn up the gain too high at the individual track level, the Master group will clip, causing harsh digital distortion.
To achieve balance:
- Calibrate: Ensure your loudest game moments (explosions, music peaks) hit the yellow zone of the mixer meters, but never the red.
- Normalize: Use the
Volumefader on yourMastergroup to set an overall ceiling. - Limit: Add a
Limitereffect to yourMastermixer group. A limiter acts like an automated guardrail; it allows you to raise the volume of quiet sounds while instantly "squashing" any peaks that exceed 0dB, preventing clipping.
Example: Limiter Configuration
You can add a Limiter effect to your Master group in the Audio Mixer Window. Select the Master group, click the Add Effect button in the Inspector, and choose Limiter.
// Example of accessing the Master Mixer volume via script
public AudioMixer masterMixer;
public void SetMasterVolume(float sliderValue)
{
// Convert linear slider (0 to 1) to Decibels (-80 to 0)
float decibels = Mathf.Log10(sliderValue) * 20;
masterMixer.SetFloat("MasterVolume", decibels);
}
By keeping your dynamic range tight and using a limiter, you ensure that even on weak hardware, the most important sounds—like dialogue or critical UI feedback—remain audible without damaging the audio signal with unwanted distortion. Always test your build on different hardware, such as a laptop, a phone, and studio headphones, to verify that your gain staging holds up under different physical limitations.
Key Takeaway: Use the Master Mixer group to apply a limiter and careful gain staging, ensuring your signal remains clear, loud, and free of clipping across all listening devices.