Exemplo n.º 1
0
  void createFilter(int n, float coeffs[]) {
    //        float alpha = 5;
    //        int order = 50;
    //        float bandwidth = 00;
    //        FIRFilterDesign d = new FIRFilterDesign(alpha, sampRate * n, sampRate / 2.4f,
    // FIRFilterDesign.LPF, order,
    //                FIRFilterDesign.KAISER, bandwidth);
    //        float coeffs[] = d.getCoefficients();
    FIRFilter filt1 = new FIRFilter();
    filt1.setCoeffs(coeffs);

    // there is a miniscule chance that concurrency problems might happen here.
    synchronized (lock) {
      filt = filt1;
      N = n;
    }
  }