[LAD] Gain in dB

Fred Gleason fredg at paravelsystems.com
Tue Oct 15 20:41:46 UTC 2013


On Oct 15, 2013, at 10:11 05, André Garnier Coutinho wrote:

> GdB = 20log(Out/In) ?

Close.  You actually want:

	GdB = 20*log10(out/in)

You probably knew this already as standard mathematical notation assumes log == 'log to the base of 10'.  However, the log() function in the math library will get you natural logarithms ('log to the base of e').  You want log10().  Been there, done that confusion myself…  :)

Cheers!


|-------------------------------------------------------------------------|
| Frederick F. Gleason, Jr. |               Chief Developer               |
|                           |               Paravel Systems               |
|-------------------------------------------------------------------------|
|         Brian Kernighan has an automobile which he helped design.       |
| Unlike most automobiles, it has neither speedometer, nor gas guage, nor |
| any of the numerous idiot lights which plague the modern driver.        |
| Rather, if the driver makes any mistake, a giant "?" lights up in the   |
| center of the dashboard.  "The experienced driver", he says, "will      |
| usually know what's wrong."                                             |
|-------------------------------------------------------------------------|



More information about the Linux-audio-dev mailing list