On 8 July 2011 02:04, Gabriel M. Beddingfield <[email protected]> wrote: > On Thursday, July 07, 2011 07:50:57 pm James Morris wrote: >> I thought a "lock-free" ring buffer was supposed to be >> the easy solution! > > It is... when you re-use one that's already been written and > debugged. ;-) > > Why not copy/paste the JACK ringbuffer (C) or even Ardours > (C++ Container)?
I think that when I was coding BoxySeq, I did look at the JACK ringbuffer code and decided to simplify it for my purposes. I "fixed it" so there was no need for the byte count parameters for read/write, and removed some of the functions I decided I didn't need (ie peek, but then re-introduced my own versions). I found problems with my implementation but it basically worked 99% of the time so I came back to it the other day with the mistaken belief that atomic read/write pointer operations along with a reduction of variables used for each read/write operation would fix it. I was rather pleased actually with how much this strategy made the code *look* cleaner, so surely it would work! James. > > -gabriel > _______________________________________________ > Linux-audio-dev mailing list > [email protected] > http://lists.linuxaudio.org/listinfo/linux-audio-dev > _______________________________________________ Linux-audio-dev mailing list [email protected] http://lists.linuxaudio.org/listinfo/linux-audio-dev
