21 #ifndef __ardour_dB_h__
22 #define __ardour_dB_h__
27 #define GAIN_COEFF_ZERO 0.f
28 #define GAIN_COEFF_SMALL 0.0000001f
29 #define GAIN_COEFF_UNITY 1.f
32 return dB > -318.8f ? pow (10.0f, dB * 0.05f) : 0.0f;
40 if (coeff < 1e-15)
return -std::numeric_limits<float>::infinity();
41 return 20.0f * log10f (coeff);
46 return 0.1 * (max_coeff / max_db);
static float dB_to_coefficient(float dB)
static float accurate_coefficient_to_dB(float coeff)
double zero_db_as_fraction
static float fast_coefficient_to_dB(float coeff)
static double dB_coeff_step(double max_coeff)
static float fast_log10(const float val)