MCPcopy Create free account
hub / github.com/aethersdr/AetherSDR / linearToDb

Function linearToDb

src/gui/ClientLevelMeter.cpp:18–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16namespace {
17
18float linearToDb(float linear)
19{
20 if (linear <= 1e-6f) return -120.0f;
21 return 20.0f * std::log10(linear);
22}
23
24// Same fast-attack / slow-release ballistics as ClientEqOutputFader so
25// the meter feels visually consistent across applets.

Callers 3

paintEventMethod · 0.70
paintEventMethod · 0.70
setPeakLinearMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected