
A Peek at GNU Radio’s Buffer Architecture - ptr
http://gnuradio.org/blog/buffers/
======
hoytech
The double-mapped ring buffer trick is so clever I can't help but wish I
invented it. :)

Here's the code for the GNU radio implementation described in the article,
it's a good reference for some various ways to set up the mappings:

[https://github.com/gnuradio/gnuradio/blob/master/gnuradio-
ru...](https://github.com/gnuradio/gnuradio/blob/master/gnuradio-
runtime/lib/vmcircbuf_createfilemapping.cc)
[https://github.com/gnuradio/gnuradio/blob/master/gnuradio-
ru...](https://github.com/gnuradio/gnuradio/blob/master/gnuradio-
runtime/lib/vmcircbuf_mmap_shm_open.cc)
[https://github.com/gnuradio/gnuradio/blob/master/gnuradio-
ru...](https://github.com/gnuradio/gnuradio/blob/master/gnuradio-
runtime/lib/vmcircbuf_mmap_tmpfile.cc)

And here some other links to implementations I've collected:

[http://vrb.sourceforge.net/](http://vrb.sourceforge.net/)

[https://fgiesen.wordpress.com/2012/07/21/the-magic-ring-
buff...](https://fgiesen.wordpress.com/2012/07/21/the-magic-ring-buffer/)
[https://gist.github.com/rygorous/3158316](https://gist.github.com/rygorous/3158316)

[https://www.mikeash.com/pyblog/friday-qa-2012-02-03-ring-
buf...](https://www.mikeash.com/pyblog/friday-qa-2012-02-03-ring-buffers-and-
mirrored-memory-part-i.html) [https://www.mikeash.com/pyblog/friday-
qa-2012-02-17-ring-buf...](https://www.mikeash.com/pyblog/friday-
qa-2012-02-17-ring-buffers-and-mirrored-memory-part-ii.html)
[https://github.com/mikeash/MAMirroredQueue](https://github.com/mikeash/MAMirroredQueue)

[http://atastypixel.com/blog/a-simple-fast-circular-buffer-
im...](http://atastypixel.com/blog/a-simple-fast-circular-buffer-
implementation-for-audio-processing/)
[https://github.com/michaeltyson/TPCircularBuffer](https://github.com/michaeltyson/TPCircularBuffer)

[http://www.koanlogic.com/libu/api/html/group__rb.html](http://www.koanlogic.com/libu/api/html/group__rb.html)

[https://github.com/ulfalizer/botniklas/blob/master/src/read_...](https://github.com/ulfalizer/botniklas/blob/master/src/read_msg.c)

[https://github.com/willemt/cbuffer](https://github.com/willemt/cbuffer)

------
quotemstr
tl;dr: the old magic ring buffer trick

------
zump
SDR strikes me as good in theory, but breaks down for anything practical.

My core 2 duo was 100% cpu utilization simply from decoding 56kbps 2-BPSK,
even with SIMD extension enabled (within GR).

~~~
kalleboo
Weren't Winmodems handling 56K v.92 fine on much older hardware? Or did they
still have more work offloaded onto the hardware?

~~~
slededit
They had an analogue front end to reduce much of the load.

