changeset 1487:71202259002d

Round the zero-point value -- won't make a difference for longer fader widgets, but it's convenient for the level-pan widget when we have 0-10 and want zero at 8 rather than 7
author Chris Cannam
date Mon, 25 Jun 2018 14:12:27 +0100
parents f2fcb3ed51fa
children 53fa8d57b728 0d4f1fcad97a
files base/AudioLevel.cpp
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/base/AudioLevel.cpp	Thu Jun 21 15:37:27 2018 +0100
+++ b/base/AudioLevel.cpp	Mon Jun 25 14:12:27 2018 +0100
@@ -127,7 +127,7 @@
 
     } else { // scale proportional to sqrt(fabs(dB))
 
-        int zeroLevel = int(maxLevel * faderTypes[type].zeroPoint);
+        int zeroLevel = int(round(maxLevel * faderTypes[type].zeroPoint));
     
         if (level >= zeroLevel) {
             
@@ -172,7 +172,7 @@
 
     } else {
 
-        int zeroLevel = int(maxLevel * faderTypes[type].zeroPoint);
+        int zeroLevel = int(round(maxLevel * faderTypes[type].zeroPoint));
 
         if (dB >= 0.) {