title: How can I apply multiple filters at same time?
body: <p>I need to apply a FIR low pass, high pass, and notch filter at the same time. Each filter has it's own set of coefficients. All use the following algorithm. Can I add or average the output of all three or is there a better way?    </p>
  
  <pre><code>SAMPLE fir_basic(SAMPLE input, int ntaps, const SAMPLE FIRcoefficient[], delay[])       
      {
          int ii;
          SAMPLE accum;
  
          /* store input at the beginning of the delay line */
          delay[0] = input;
  
          /* calc FIR */
          accum = 0;
          for (ii = 0; ii &lt; ntaps; ii++) {
              accum += FIRcoefficient[ii] * delay[ii];
          }
  
          /* shift delay line */
          for (ii = ntaps - 2; ii &gt;= 0; ii--) {
              delay[ii + 1] = delay[ii];
          }
  
          return accum;
      }
  </code></pre>