shithub: sox

Download patch

ref: edac8bf104da18890ef8fbc17ca1dd5c9732145c
parent: 27f834ac163241a5ebb09a7952d8b704b30e1a60
author: robs <robs>
date: Fri Oct 24 02:21:07 EDT 2008

ChangeLog

--- a/src/normalise.c
+++ b/src/normalise.c
@@ -62,13 +62,13 @@
     lsx_fail("error writing temporary file: %s", strerror(errno));
     return SOX_EOF;
   }
-  if (p->balance) for (len = *osamp; len; --len, ++ibuf) {
+  if (p->balance) for (len = *isamp; len; --len, ++ibuf) {
     size_t dummy = 0;
     double d = SOX_SAMPLE_TO_FLOAT_64BIT(*ibuf, dummy);
     p->rms += sqr(d);
     ++p->num_samples;
   }
-  else for (len = *osamp; len; --len, ++ibuf) {
+  else for (len = *isamp; len; --len, ++ibuf) {
     p->max = max(p->max, *ibuf);
     p->min = min(p->min, *ibuf);
   }