[LAD] JACK latency API clarifications

Stefano D'Angelo zanga.mail at gmail.com
Fri Feb 21 15:04:18 UTC 2014


2014-02-21 16:51 GMT+02:00 Paul Davis <paul at linuxaudiosystems.com>:
>
>
>
> On Fri, Feb 21, 2014 at 9:38 AM, Stefano D'Angelo <zanga.mail at gmail.com>
> wrote:
>>
>> Sorry guys, other two (silly?) questions:
>>
>> 1. apart from the process callback, which callbacks need to be
>> RT-safe? Looking around I found a master thesis [1] that says: "Apart
>> from
>> the JackProcessCallback callback, which is called in the realtime
>> audio thread for obvious reasons, all other callbacks are called
>> asynchronously in a specialized non-realtime thread, to avoid
>> notifications to interfere with audio processing", is that true?
>
>
> The documentation does actually state which ones need to be RT, but there is
> no list to easily consult.

Well, here http://jackaudio.org/files/docs/html/group__ClientCallbacks.html
I only see that process has to be RT-safe and thread-init needs not,
but regarding others I have no clue. Is that stated somewhere else or
am I missing something?

> The threading design described above is specific to Jack2. Jack1 delivers
> all callbacks to the same thread (which necessarily means that processing
> audio is blocked by other callbacks). This is one of the major (and largely
> hidden) design differences between Jack1 and Jack2.

What truly interests me is whether non-process callbacks can block. It
seems that's not the case with Jack1 then?

>> 2. may the system sample rate actually change (while a client is running)?
>
>
> JACK to date has never supported changing the sample rate.

I wonder what the jack_set_sample_rate_callback() is for then, but at
this point I don't care.

Stefano


More information about the Linux-audio-dev mailing list