convertLinearGainToDecibel

Converts from linear gain (voltage) to decibels (dB).

  1. float convertLinearGainToDecibel(float x)
    nothrow @nogc pure @safe
    float
    convertLinearGainToDecibel
    (
    float x
    )
  2. double convertLinearGainToDecibel(double x)

Return Value

Type: float

A decibel value.

Note: 1.0 linear gain is 0 dB in decibels. 0.5 linear gain is -6 dB in decibels. 0.0 linear gain is -inf dB in decibels.

Precision: This uses fast_exp which under normal conditions has a peak error under -135dB over the useful range.

Meta