[DUG] Re: linear audio volume to db conversion

Ross Levis ross at stationplaylist.com
Sun Jun 19 00:44:06 NZST 2005


Nevermind, I think I've got it.

10*log10(x/127)

Cheers,
Ross.
  ----- Original Message ----- 
  From: Ross Levis 
  To: NZ Borland Developers Group - Delphi List 
  Sent: Sunday, June 19, 2005 12:25 AM
  Subject: linear audio volume to db conversion


  I was never any good at logarithms.

  I need to convert a linear audio volume to decibels.  The values start at 0 being silence and 127 being maximum.  This needs to be translated to db starting at 0db being maximum volume, and going negative to like -20db being a low volume.  This will be a VU meter.  I'm sure I need to use the Log10 math function, but I'm lost.

  Many thanks,
  Ross.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ns3.123.co.nz/pipermail/delphi/attachments/20050619/626d61da/attachment.html


More information about the Delphi mailing list