Skip to content

Function amp_to_dB

function amp_to_dB(const T1 &) dsp

template <numeric T1>
KFR_FUNCTION flt_type<T1> amp_to_dB(const T1& x)

Convert an amplitude value to decibels (20*log10).

The conversion is based on the absolute value, so the sign of the input is ignored. An input of 0 yields -infinity.

Parameters
x Amplitude (1.0 corresponds to 0 dB).
Returns
Level in decibels.

Fully qualified name: kfr::amp_to_dB(const T1 &)

Declared at dsp/units.hpp:195

Function amp_to_dB

function amp_to_dB(E1 &&) dsp

template <expression_argument E1>
KFR_FUNCTION expression_function<fn::amp_to_dB, E1> amp_to_dB(E1&& x)

Convert an amplitude expression to decibels (20*log10).

Parameters
x Expression yielding amplitudes (1.0 corresponds to 0 dB).
Returns
Expression yielding levels in decibels.

Fully qualified name: kfr::amp_to_dB(E1 &&)

Declared at dsp/units.hpp:207

This file was generated by cxxdox, a C++ documentation generator based on MkDocs Material and libclang.