[LAD] easiest way to serialize messages for sending over a ringbuffer?

Harry van Haaren harryhaaren at gmail.com
Tue Dec 13 03:31:25 UTC 2011


On Tue, Dec 13, 2011 at 3:24 AM, Iain Duncan <iainduncanlists at gmail.com>wrote:

> I guess I need some kind of serialization to send this over a jack
> ringbuffer, but I've zero experience with serialization in C++.
>

I don't really understand what your asking here, you want to be able to set
the order of the messages in the ringbuffer?

Its a FIFO queue, as in First In - First Out. So the order of the messages
is the same as you write them...
Perhaps I'm misunderstanding you :S

W.r.t OSC, there's 2 ways to run an OSC server, polling or having
callbacks. If you have callbacks it involves a having a seperate OscServer
thread. This means you'll need to use a seperate RingBuffer too, as the
JACK ringbuffer is a SRSW queue. (single read, single write)

If you're using the GUI thread to poll the OscServer, then you can use the
same RingBuffer and you'll have more control over the order of GUI / OSC
events...

Then again, if you can do the "ordering" on the recieving side of the
RingBuffers, then it really makes no difference :D
All the best, -H
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxaudio.org/pipermail/linux-audio-dev/attachments/20111213/68534598/attachment.html>


More information about the Linux-audio-dev mailing list