[LV2] Idle interface and Plugin => UI ringbuffer overflow

Devin Anderson surfacepatterns at gmail.com
Mon Jun 24 19:10:50 PDT 2013

Hi Harry,

On Mon, Jun 24, 2013 at 6:54 PM, Harry van Haaren <harryhaaren at gmail.com> wrote:

> This is achievable trough quite easily, but is this the cleanest solution?

There's a couple ways you can deal with this issue:

1.) Have a separate thread that handles data from the ringbuffer.  Use
that thread to pass events onto the UI thread in such a way that the
thread doesn't block waiting for the UI event to finish.  The UI will
queue up the events, waiting for control to return the event loop.  In
Qt, this is done by calling QObject::connect with the connection type
set to Qt::QueuedConnection.

2.) Make your dialogs modal, but instead of calling the dialog's event
loop function, show the dialog and then return to the main event loop.
 I know you can do this in Qt; I'm not sure about other UI libraries.

I use both of these strategies in synthclone.

Devin Anderson
surfacepatterns (at) gmail (dot) com

blog - http://surfacepatterns.blogspot.com/
midisnoop - http://midisnoop.googlecode.com/
psinsights - http://psinsights.googlecode.com/
synthclone - http://synthclone.googlecode.com/

More information about the Devel mailing list