diff base/AudioLevel.cpp @ 750:5bfc4930588d

Meter deflection fix due to Robin Gareus
author Chris Cannam
date Wed, 26 Sep 2012 21:27:10 +0100
parents bdc9bb371a9f
children cc27f35aa75c
line wrap: on
line diff
--- a/base/AudioLevel.cpp	Sat Jun 30 15:05:12 2012 +0100
+++ b/base/AudioLevel.cpp	Wed Sep 26 21:27:10 2012 +0100
@@ -78,7 +78,7 @@
     } else if (db < -60.0f) {
         def = (db + 70.0f) * 0.25f;
     } else if (db < -50.0f) {
-        def = (db + 60.0f) * 0.5f + 5.0f;
+        def = (db + 60.0f) * 0.5f + 2.5f; // corrected from 5.0f base, thanks Robin Gareus
     } else if (db < -40.0f) {
         def = (db + 50.0f) * 0.75f + 7.5f;
     } else if (db < -30.0f) {
@@ -104,8 +104,8 @@
 	db = (def - 15.0f) / 1.5f - 40.0f;
     } else if (def >= 7.5f) {
 	db = (def - 7.5f) / 0.75f - 50.0f;
-    } else if (def >= 5.0f) {
-	db = (def - 5.0f) / 0.5f - 60.0f;
+    } else if (def >= 2.5f) {
+	db = (def - 2.5f) / 0.5f - 60.0f;
     } else {
 	db = (def / 0.25f) - 70.0f;
     }