SND_CalcDecibel

Syntax

#include <nitro/snd.h>
s16 SND_CalcDecibel( int scale );

Arguments

scale The scale value. Takes a value between 0 and 127.

Return Values

Returns the decibel value that corresponds to the scale value. Value is in units of 0.1dB

Description

Calculates the decibel value.

The calculation is performed using the following equation:

20 x log10( scale / 127 ) 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.

See Also

None.

Revision History

2005/09/22 Added explanation of when the scale value is 0.
2004/07/20 Initial version.


CONFIDENTIAL