add VU and IEC meter DSP (from jmeters)
[ardour.git] / gtk2_ardour / logmeter.h
index c9addec8f5109e2c49433d83dd7981c869f42b58..d86150908002bcc60e060ab031cbbe3c084b91b8 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2000-2007 Paul Davis 
+    Copyright (C) 2000-2007 Paul Davis
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
 #define __ardour_gtk_log_meter_h__
 
 #if 1
-inline float
+static inline float
 _log_meter (float power, double lower_db, double upper_db, double non_linearity)
 {
        return (power < lower_db ? 0.0 : pow((power-lower_db)/(upper_db-lower_db), non_linearity));
 }
 
-inline float
+static inline float
 alt_log_meter (float power)
 {
        return _log_meter (power, -192.0, 0.0, 8.0);
@@ -38,7 +38,7 @@ inline float
 log_meter (float db)
 {
          gfloat def = 0.0f; /* Meter deflection %age */
+
          if (db < -70.0f) {
                  def = 0.0f;
          } else if (db < -60.0f) {
@@ -56,8 +56,8 @@ log_meter (float db)
          } else {
                 def = 115.0f;
         }
-        /* 115 is the deflection %age that would be 
+
+        /* 115 is the deflection %age that would be
            when db=6.0. this is an arbitrary
            endpoint for our scaling.
         */