Re: [LAD] jack ringbuffer question

From: Kjetil S. Matheussen <k.s.matheussen@email-addr-hidden>
Date: Wed Dec 02 2009 - 19:26:43 EET

lieven moors:
>>
>>> I want to repeat the same Arp, until there is an update to the text file.
>>> One arp is allready
>>> loaded in each ringbuffer in main(). When the file is modified, a second one
>>> is added, and
>>> process skips to the second one. Since I have only space for two arps in the
>>> buffer, there
>>> should always be exactly one which is readable. I know it is a bit weird,
>>> but it seems to
>>> work, apart from the problem I described.
>>>
>>
>> sounds as if you might want to look into atomic pointer and/or integer
>> exchange instead, to get lock-free double buffering.
>>
>> ringbuffers are generally for passing streaming data/events.
>>
>>
> Could you give me a hint on how to use atomic pointers?

I've used the lockless lifo/fifo-queue implementations found in
midishare a few times. Those are really simple to use:
http://midishare.sourceforge.net/

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev
Received on Wed Dec 2 20:15:06 2009

This archive was generated by hypermail 2.1.8 : Wed Dec 02 2009 - 20:15:07 EET