Re: [LAD] Communicating between python UI and C++ engine for real time audio?

From: Emanuel Rumpf <xbran@email-addr-hidden>
Date: Fri Nov 04 2011 - 19:16:28 EET

2011/11/3 Paul Davis <paul@email-addr-hidden>:
> On Thu, Nov 3, 2011 at 4:02 PM, Harry van Haaren <harryhaaren@email-addr-hidden> wrote:
>> Just wrap two ringbuffers into a single class, and then have two set / get
>> functions.
>>
>> Basically one "RtQueue" instance can pass messages back and forth between
>> two threads lock free.
>> I'd like to improve it so that one get / set method is there, and its
>> thread-aware so it will automatically push / pull to the right ringbuffer.
>> But that's a touch hard for me as I'm using GLib threads and finding which
>> thread is running is something i can't do yet :D
>
> this approach requires that all your data structures can be
> representable as POD (plain old data) and be effectively and easily
> de/serialized from/to a bytestream.
>
> this can be quite restrictive. linked lists, for example ...
>

While this is restrictive, in the way you mention, I think it's a
welcome simplification
( compared to implementing a real-time-capable-linked-list + other
rt-structures ),
if your use-case doesn't require direct calls to the list (for any reason),
then you could request insert/remove/update operations through the
rt-ring-buffer.

-- 
E.R.
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Fri Nov 4 20:15:01 2011

This archive was generated by hypermail 2.1.8 : Fri Nov 04 2011 - 20:15:01 EET