Hi there. How I can convert AudioSampleBuffer::getMagnitude() to dB units?
static inline float ampTodB (const float amp) noexcept { return log10 (amp) * 20.f; }
static inline float dBToAmp (const float dB) noexcept { return pow (10.f, dB * (1.f / 20.f)); }
There’s actually a Decibels class containing conversion functions like that.
sorry, forgot you added that…
Thank you