[xiph-commits] r13232 - trunk/ghost/libghost

jm at svn.xiph.org jm at svn.xiph.org
Thu Jul 5 22:54:45 PDT 2007


Author: jm
Date: 2007-07-05 22:54:45 -0700 (Thu, 05 Jul 2007)
New Revision: 13232

Modified:
   trunk/ghost/libghost/ghost.c
Log:
Disabling the noise quantization by default because it can cause NaNs


Modified: trunk/ghost/libghost/ghost.c
===================================================================
--- trunk/ghost/libghost/ghost.c	2007-07-06 05:40:58 UTC (rev 13231)
+++ trunk/ghost/libghost/ghost.c	2007-07-06 05:54:45 UTC (rev 13232)
@@ -283,9 +283,9 @@
             noise[i] = ener*sqrt(12.)*((((float)(rand()))/RAND_MAX)-.5);
       }
       
-      for (i=0;i<st->advance;i++)
+      /*for (i=0;i<st->advance;i++)
          printf ("%f\n", noise[i]);
-      printf ("\n");
+      printf ("\n");*/
       for (i=0;i<st->advance;i++)
          noise[i] = 16*floor(.5+.0625*noise[i]);
       for (i=0;i<st->advance;i++)
@@ -295,9 +295,8 @@
       /*for (i=0;i<st->advance;i++)
       pcm[i] = st->current_frame[i]-st->new_noise[i];*/
       
-      /* Remove the 0* if you want to include the lpc-generated noise as well */
       for (i=0;i<st->advance;i++)
-         pcm[i] = st->current_frame[i]-st->new_noise[i] + 0*noise[i];
+         pcm[i] = st->current_frame[i]-st->new_noise[i] /*+ noise[i]*/;
       
    }
    



More information about the commits mailing list