On Jun 5, 2006, at 8:16 PM, Malcolm Smith wrote:
You can calculate log10(val) by log(val)/log(10). Since log is
relatively slow, you might want to store the log(10) value.
You could store k = 20.0 / log(10) as your constant and then your
function would just return k * log(val).
I hope that helps.
Cheers,
Malcolm
On Jun 5, 2006, at 10:05 AM, Aleksi Strandberg wrote:
Hi,
Almost after sending the question, i got answer from Frank Condello:
decibels = 10.0 * ( Log(val)/Log(10) ) * 2.0
Aleksi
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>