Next |
Prev |
Up |
Top
|
JOS Index |
JOS Pubs |
JOS Home |
Search
C Code:
static double D[M]; /* initialized to zero */
static long ptr=0; /* read-write offset */
double delayline(double x)
{
double y = D[ptr]; /* read operation */
D[ptr++] = x; /* write operation */
if (ptr >= M) { ptr -= M; } /* wrap ptr */
return y;
}
- Circular buffer in software
- Shared read/write pointer
- Length not easily modified in real time
- Internal state (``instance variables'')
= length
array + read pointer
Next |
Prev |
Up |
Top
|
JOS Index |
JOS Pubs |
JOS Home |
Search
Download Delay.pdf
Download Delay_2up.pdf
Download Delay_4up.pdf