make dbr calculation precise

This commit is contained in:
2025-12-29 21:46:41 +01:00
parent b51b66d0a1
commit 3577d67264
2 changed files with 23 additions and 1 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ inline float dbr_to_deviation(float dbr) {
inline float deviation_to_dbr(float deviation) {
if (deviation < 1e-6f) return -100.0f;
return 10.0f * (log2f(deviation) - LOG2_19000) * 0.30103f;
return 10*log10f(deviation/19000);
}
void init_bs412(BS412Compressor* mpx, uint32_t mpx_deviation, float target_power, float attack, float release, float max, uint32_t sample_rate) {