[xiph-commits] r18236 - trunk/spectrum

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Fri Apr 13 12:10:57 PDT 2012


Author: xiphmont
Date: 2012-04-13 12:10:57 -0700 (Fri, 13 Apr 2012)
New Revision: 18236

Modified:
   trunk/spectrum/version.h
   trunk/spectrum/wave_process.c
Log:
log scale center deadzone fix


Modified: trunk/spectrum/version.h
===================================================================
--- trunk/spectrum/version.h	2012-04-13 19:05:10 UTC (rev 18235)
+++ trunk/spectrum/version.h	2012-04-13 19:10:57 UTC (rev 18236)
@@ -1,2 +1,2 @@
 #define VERSION "$Id$ "
-/* DO NOT EDIT: Automated versioning hack [Fri Apr 13 15:03:52 EDT 2012] */
+/* DO NOT EDIT: Automated versioning hack [Fri Apr 13 15:10:40 EDT 2012] */

Modified: trunk/spectrum/wave_process.c
===================================================================
--- trunk/spectrum/wave_process.c	2012-04-13 19:05:10 UTC (rev 18235)
+++ trunk/spectrum/wave_process.c	2012-04-13 19:10:57 UTC (rev 18236)
@@ -107,10 +107,13 @@
           float drange=todB(range)-scale;
           for(k=0;k<spann;k++){
             if(data[k]<0){
-              *(plotdatap++)=-(todB(data[k])-scale)/drange;
+              *plotdatap=-(todB(data[k])-scale)/drange;
+              if(*plotdatap>0.)*plotdatap=0.;
             }else{
-              *(plotdatap++)=(todB(data[k])-scale)/drange;
+              *plotdatap=(todB(data[k])-scale)/drange;
+              if(*plotdatap<0.)*plotdatap=0.;
             }
+            plotdatap++;
           }
         }else{
           for(k=0;k<spann;k++)



More information about the commits mailing list