[LAD] timing the processing of queues between engine and ui threads?
d at drobilla.net
Fri Nov 4 03:05:41 UTC 2011
On Thu, 2011-11-03 at 18:32 -0700, Iain Duncan wrote:
> thanks Dave, that's what I was looking for! Have you used this
> technique yourself? Do you have any suggestions on how that is done
> with non jack systems? And any open source code that uses that
Yes, I use it in Ingen, where all control is via Events.
Event has three main methods:
pre_process() - ("prepare") Execute everything in a non-realtime thread
that has to happen before execution in the audio thread
execute() - ("apply") Execute/apply command in the audio thread
post_process() - ("finalize") Execute anything that needs to happen
after execution in a non-realtime thread, like clean up and notifying
the UI(s) about changes.
The only difference non-jack would make is you need some function to
tell you roughly what audio time it is you can call from another thread.
More information about the Linux-audio-dev