Last active
November 27, 2018 13:14
-
-
Save jhrr/ce396e0bb9882a312f7f071df9a1f494 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 */ | |
// *(ptr++) = x; ?? | |
if (ptr >= M) { | |
ptr -= M; /* wrap ptr */ | |
} | |
return y; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment