shithub: sox

Download patch

ref: b64d8dc0823fba431eca1474fdc8c54bb4f14eb9
parent: 7bbcb9d7527e4f0069ce79a8fb29c86cb10b1618
author: jching <jching>
date: Mon Aug 29 16:38:04 EDT 2005

Avoid using non-ANSI library routine.

--- a/src/noiseprof.c
+++ b/src/noiseprof.c
@@ -94,8 +94,8 @@
     PowerSpectrum(WINDOWSIZE, chan->window, out);
 
     for (i = 0; i < FREQCOUNT; i ++) {
-        float value = log(out[i]);
-        if (finite(value)) {
+        if (out[i] > 0) {
+            float value = log(out[i]);
             chan->sum[i] += value;
             chan->profilecount[i] ++;
         }