From 262edd6e8a519b1e7a4224a70852f3d5ac6fc455 Mon Sep 17 00:00:00 2001 From: Krzysztof Foltman Date: Sat, 6 Nov 2010 23:46:24 +0000 Subject: [PATCH] The range given in the comment wasn't really correct. (cherry picked from commit 292cdaa81dab7e7d948f597041cb86d70dc5ff92) --- plugins/ladspa_effect/calf/src/calf/giface.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/ladspa_effect/calf/src/calf/giface.h b/plugins/ladspa_effect/calf/src/calf/giface.h index 746200bd5..bc01da33a 100644 --- a/plugins/ladspa_effect/calf/src/calf/giface.h +++ b/plugins/ladspa_effect/calf/src/calf/giface.h @@ -636,7 +636,7 @@ extern const char *calf_copyright_info; bool get_freq_gridline(int subindex, float &pos, bool &vertical, std::string &legend, cairo_iface *context, bool use_frequencies = true, float res = 256, float ofs = 0.4); -/// convert amplitude value to normalized grid-ish value (0dB = 0.5, 30dB = 1.0, -30 dB = 0.0, -60dB = -0.5, -90dB = -1.0) +/// convert amplitude value to normalized grid-ish value static inline float dB_grid(float amp, float res = 256, float ofs = 0.4) { return log(amp) * (1.0 / log(res)) + ofs;