[LV2] worker thread question
robin at gareus.org
Sun Dec 30 00:16:20 PST 2012
On 12/30/2012 08:43 AM, hermann meyer wrote:
> Thanks Robin, for your input, what is open now for me is that I
> need to read the port values in the worker thread, and that I would
> watch them "outside" from run(). From what I understand about
> glib-threads there is no problem as long I only read the values
> were my pointers point to (data).
I'm not aware of the spec mandating specific behavior of port values for
the host-side implementation of the worker thread. Dave?
You can access the instance LV2_Handle in the worker thread and
you can also use the user-data field to pass information along to it.
Since you likely have a local copy of the port data anyway (to compare
if value_changed()) it's safer to use that local copy from your
instance. Opposed to the data pointed to by ports, you are in control
of that variable.
AFAICT The port values themselves may or may not be valid and/or point
to new or old data depending on the host implementation while the worker
More information about the Devel