[LAD] JACK session API in Perl, Python, Ruby, and Lua
David Robillard
d at drobilla.net
Wed Mar 28 17:45:34 UTC 2012
On Wed, 2012-03-28 at 10:35 -0700, Ed Sweeney wrote:
> On Thu, Mar 22, 2012 at 09:03:12AM +0100, Emanuel Rumpf wrote:
[...]
> > The code uses a mutex_lock in the process callback:
> >
> > _lock(_this_);
> > _this_->nframes = nframes;
> > _unlock(_this_);
[...]
> Emanuel, thx for the suggestion. The job of that mutex is to block the
> callback until the user code has run, _trylock wouldn't do that.
"Block the callback" = "Cause a dropout"
Don't do that.
The standard solution if you need to process audio with
non-realtime-safe code is to ringbuffer the data to/from the process
callback.
-dr
More information about the Linux-audio-dev
mailing list