insertFilter -- delay-line update routine * * Inserts the passed value into the currPos and increments the * currPos pointer modulo the length of the delay line. * */
| 466 | * |
| 467 | */ |
| 468 | static void insertFilter(FILTER* p, double val) |
| 469 | { |
| 470 | /* Insert the passed value into the delay line */ |
| 471 | *p->currPos = val; |
| 472 | |
| 473 | /* Update the currPos pointer and wrap modulo the delay length */ |
| 474 | if (((double*) (++p->currPos)) > |
| 475 | ((double*)p->delay.auxp + (p->ndelay-1)) ) |
| 476 | p->currPos -= p->ndelay; |
| 477 | } |
| 478 | |
| 479 | /* Compute polynomial coefficients from the roots */ |
| 480 | /* The expanded polynomial is computed as a[0..N] in |