📄 ccan2.c
字号:
/* ccan2.c - circular buffer implementation of canonical realization */void wrap2(); /* defined in Section \ref{hardware.sec} */double ccan2(M, a, b, w, q, x)double *a, *b, *w, x; /* q = circular pointer offset index */int M, *q; /* a,b have common order M */{ int i; double y = 0; w[*q] = x; /* read input sample x */ for (i=1; i<=M; i++) w[*q] -= a[i] * w[(*q+i)%(M+1)]; for (i=0; i<=M; i++) y += b[i] * w[(*q+i)%(M+1)]; (*q)--; /* update circular delay line */ wrap2(M, q); return y; /* output sample */}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -