The returned volume, expressed in dB, is based upon a logarithmic scale and can be in the range from -100 (silence) to 0 (max volume)
The actual applied formula for converting a linear volume into a logarithmic volume is the following:
VolumeInDB = 20 * log10 (VolumeLinear/100)
The C syntax for converting a logarithmic volume into a linear volume is the following:
VolumeLinear = 100 * pow (10, VolumeInDB/20);
|