#include <nitro/snd.h>
s16 SND_CalcDecibelSquare( int scale );
Returns the decibel value the corresponds to the square of the scale value. Value is in units of 0.1dB
Calculates the decibel value that corresponds to the square of the scale value.
The calculation is performed using the following equation:
20 x log10(( scale
÷ 127 ) ** 2) x 10
Because the unit is 0.1dB, the number is multiplied by 10 as the final step.
When scale
is 0, it returns -32768.
None.
2005/09/22 Added explanation of when the scale value is 0.
2004/07/20 Initial version.
CONFIDENTIAL