fix a few small typos in the FIR computation

Change-Id: I6e56b514fe520f30f7487f85c64ea5d2a7c19b40
Signed-off-by: Glenn Kasten <gkasten@google.com>
diff --git a/tools/resampler_tools/fir.cpp b/tools/resampler_tools/fir.cpp
index 919a97b..0ab2d2b 100644
--- a/tools/resampler_tools/fir.cpp
+++ b/tools/resampler_tools/fir.cpp
@@ -78,10 +78,9 @@
     const int nz = 4;
     
     // total number of coefficients
-    const int N = (1 << 4) * nzc;
+    const int N = (1 << nz) * nzc;
 
     // generate the right half of the filter
-
     printf("const int32_t RESAMPLE_FIR_SIZE           = %d;\n", N);
     printf("const int32_t RESAMPLE_FIR_NUM_COEF       = %d;\n", nzc);
     printf("const int32_t RESAMPLE_FIR_COEF_BITS      = %d;\n", nc);
@@ -91,19 +90,16 @@
     printf("static int16_t resampleFIR[%d] = {", N);
     for (int i=0 ; i<N ; i++)
     {
-        double x = (2.0 * M_PI * i * Fcr) / (1 << 4);
+        double x = (2.0 * M_PI * i * Fcr) / (1 << nz);
         double y = kaiser(i+N, 2*N, alpha) * sinc(x);
 
         int yi = floor(y * (1<<(nc-1)) + 0.5);
         if (yi >= (1<<(nc-1))) yi = (1<<(nc-1))-1;        
 
-        //printf("%6d\n", yi);
-
         if ((i % (1 << 4)) == 0) printf("\n    ");
         printf("0x%04x, ", yi & 0xFFFF);
     }
     printf("\n};\n");
-
     return 0;
  }
  
\ No newline at end of file