Volume
Last updated
Last updated
We often encounter two types of volume units in Unity and BroAudio, both relative to the original audio file's volume:
Normalized Volume: When set to 1, it represents 100% of the file's original volume, while 0 represents 0% volume, which means complete silence. Unity's volume uses this unit.
Decibel Volume (dB): This is the most commonly used unit to describe volume. It represents a logarithmic value. When set to 0dB, it means no changes to the file's original volume (so 0dB = 1 normalized volume). Unity's uses this unit.
These two volume units can be converted into each other. Although you don't need to do the calculations yourself, if you are interested, the formula is as follows:
(V1/V2) is the same as Normalized Volume. There are many simple available for use. By entering the Normalized Volume into the Voltage Gain, you can convert it to dB.
In BroAudio, every sound plays through the , with a volume range of 0 to 10 (-80dB to +20dB). This is 20dB more than what offers, meaning you can produce sounds louder than the original files. This feature helps you to easily adjust and balance the overall volume.
Volume range will be limited to 0~1 (-80dB~0dB) in WebGL,
The volume slider is based on decibel value; it's a logarithmic slider instead of a linear slider like 's volume. This matches human sound perception better and allows for easier fine-tuning.
To further ensure precision, most audio software, including , features custom scale settings. Below is a comparison of different slider types, with each measured in decibels(dB) :
There are three volume settings available in BroAudio, and they all work in conjunction.
The final playback volume (in normalized) will be
Clip Volume * Entity Master Volume * SetVolume(if it's implemented)
(of the entity)
(API)