QUOTE(andrew_smolko @ Aug 30 2006, 22:50)

I want to convert volume from dB to [1,100] range, i.e. f(1) = -100.0 dB, f(100) = 0.00dB.
For
gain to scale conversion see audio_math::gain_to_scale(). Your example shows the opposite direction (scale to gain), which would be
CODE
inline audio_sample scale_to_gain(double p_scale) {return (audio_sample) (20.0 * log10(p_scale));}
Note: a) The above assumes 0.0 < scale <= 1.0 for both directions. b) The user interface may use a different mapping.
Regarding titleformatting: There are not floating point operations in the titleformat language; that is also a bit out of the scope of the development forum.