On Thu, 10 Apr 2014 14:10:23 -0400
David Robillard <d(a)drobilla.net> wrote:
On Wed, 2014-04-02 at 20:47 +0100, Will Godfrey
wrote:
[...]
Also - and I don't know if this is actually a
realistic situation - how would I
handle an all alsa setup? Would there be anything preventing me just linking to
the ring buffer itself?
It's just a ringbuffer, little thing. If you're concerned about a
dependency you can just copy the Jack one or choose from any number of
others floating around the web.
Here's my two, in C and C++ flavours, FWIW:
http://svn.drobilla.net/zix/trunk/zix/ring.h
http://svn.drobilla.net/zix/trunk/zix/ring.c
http://svn.drobilla.net/lad/trunk/raul/raul/RingBuffer.hpp
Last I checked, these, the Jack one, and the one(s) in Ardour are doing
the same things as far as barriers and correctness are concerned. I
can't rigorously claim they are correct, but they seem correctish and
several people have hammered on them with many threads with no
observable error.
There was a test suite / ringbuffer shootout (by Olivier Guilyardi and
subsequently tinkered with by others) called "rbtest", but the
repository seems to have fallen off the face of the Internet and I can't
find it anymore.
Cheers,
Thanks a lot David. That was most helpful.
--
It wasn't me! (Well actually, it probably was)
... the hard part is not dodging what life throws at you,
but trying to catch the good bits.