shithub: sox

Download patch

ref: ab32b8ada4db2731120d995450517fa5efd1a12c
parent: 6217a8c0415657acef3896a0a1bcc1a0c42a9c0c
author: robs <robs>
date: Wed Mar 18 13:43:29 EDT 2009

back this out as it is now in stats

--- a/src/stat.c
+++ b/src/stat.c
@@ -228,7 +228,7 @@
  */
 static int sox_stat_stop(sox_effect_t * effp)
 {
-  priv_t * stat = (priv_t *) effp->priv, stat0 = *stat;
+  priv_t * stat = (priv_t *) effp->priv;
   double amp, scale, rms = 0, freq;
   double x, ct;
 
@@ -284,7 +284,6 @@
   fprintf(stderr, "RMS     delta:     %12.6f\n", sqrt(stat->dsum2/(ct-1)));
   freq = sqrt(stat->dsum2/stat->sum2)*effp->in_signal.rate/(M_PI*2);
   fprintf(stderr, "Rough   frequency: %12d\n", (int)freq);
-  fprintf(stderr, "Peak level (dBFS): %12.6f\n", 20 * log(stat0.scale * (1. / SOX_SAMPLE_MAX) * max(fabs(stat0.max), fabs(stat0.min))));
 
   if (amp>0)
     fprintf(stderr, "Volume adjustment: %12.3f\n", SOX_SAMPLE_MAX/(amp*scale));