circular array in c for a delay line
-
09-10-2019 - |
Question
I'm trying to find any resources online for programming a delay line in c.
I tried implementing this one here
https://ccrma.stanford.edu/~jos/doppler/Variable_Delay_Line_Software.html.
The problem with this is where it says
A[wptr++] = x;
The compiler throws an error because wptr is a pointer and not an integer.
Could somebody point me toward an example of a compiler friendly example?
Solution
Replace:
A[wptr++] = x;
y = A[rptr++];
with:
*(wptr++) = x;
y = *(rptr++);
OTHER TIPS
this should be:
*(wptr++) = x;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow