diff base/AudioLevel.h @ 1038:cc27f35aa75c cxx11

Introducing the signed 64-bit frame index type, and fixing build failures from inclusion of -Wconversion with -Werror. Not finished yet.
author Chris Cannam
date Tue, 03 Mar 2015 15:18:24 +0000
parents d397ea0a79f5
children 48e9f538e6e9
line wrap: on
line diff
--- a/base/AudioLevel.h	Tue Mar 03 09:33:59 2015 +0000
+++ b/base/AudioLevel.h	Tue Mar 03 15:18:24 2015 +0000
@@ -35,7 +35,7 @@
 {
 public:
 
-    static const float DB_FLOOR;
+    static const double DB_FLOOR;
 
     enum FaderType {
 	     ShortFader = 0, // -40 -> +6  dB
@@ -45,19 +45,19 @@
 	   PreviewLevel = 4
     };
 
-    static float multiplier_to_dB(float multiplier);
-    static float dB_to_multiplier(float dB);
+    static double multiplier_to_dB(double multiplier);
+    static double dB_to_multiplier(double dB);
 
-    static float fader_to_dB(int level, int maxLevel, FaderType type);
-    static int   dB_to_fader(float dB, int maxFaderLevel, FaderType type);
+    static double fader_to_dB(int level, int maxLevel, FaderType type);
+    static int    dB_to_fader(double dB, int maxFaderLevel, FaderType type);
 
-    static float fader_to_multiplier(int level, int maxLevel, FaderType type);
-    static int   multiplier_to_fader(float multiplier, int maxFaderLevel,
+    static double fader_to_multiplier(int level, int maxLevel, FaderType type);
+    static int    multiplier_to_fader(double multiplier, int maxFaderLevel,
 				     FaderType type);
 
     // fast if "levels" doesn't change often -- for audio segment previews
-    static int   multiplier_to_preview(float multiplier, int levels);
-    static float preview_to_multiplier(int level, int levels);
+    static int    multiplier_to_preview(double multiplier, int levels);
+    static double preview_to_multiplier(int level, int levels);
 };