Ripple mode: basic implementation
[ardour.git] / libs / ardour / mix.cc
index 3a873a8e5049d9e091ef9cd43cfdc5cefdb6fe08..220cd0660c205c3a9889c8d9090dff0d9ab37222 100644 (file)
@@ -24,6 +24,8 @@
 #include "ardour/runtime_functions.h"
 #include <stdint.h>
 
+using std::min;
+using std::max;
 using namespace ARDOUR;
 
 #if defined (ARCH_X86) && defined (BUILD_SSE_OPTIMIZATIONS)
@@ -93,22 +95,22 @@ default_compute_peak (const ARDOUR::Sample * buf, pframes_t nsamples, float curr
 }
 
 void
-default_find_peaks (const ARDOUR::Sample * buf, pframes_t nframes, float *min, float *max)
+default_find_peaks (const ARDOUR::Sample * buf, pframes_t nframes, float *minf, float *maxf)
 {
        pframes_t i;
        float a, b;
 
-       a = *max;
-       b = *min;
+       a = *maxf;
+       b = *minf;
 
        for (i = 0; i < nframes; i++)
        {
-               a = fmax (buf[i], a);
-               b = fmin (buf[i], b);
+               a = max (buf[i], a);
+               b = min (buf[i], b);
        }
 
-       *max = a;
-       *min = b;
+       *maxf = a;
+       *minf = b;
 }
 
 void