19 lines
285 B
C++
19 lines
285 B
C++
#include "../public/dsp_ringbuffer.hpp"
|
|
#include <cstdio>
|
|
|
|
|
|
int main()
|
|
{
|
|
dsp::RingBuffer<int> buffer(10);
|
|
printf("Buffer capacity = %zu\n", buffer.capacity());
|
|
for (int i; i < 10; i++)
|
|
{
|
|
buffer.put(i+1);
|
|
int v = buffer.get(2);
|
|
printf("i=%d: v=%d\n", i, v);
|
|
|
|
}
|
|
|
|
|
|
return 0;
|
|
} |