context: add force-quantum and force-rate property

Add a node.force-quantum and node.force-rate property. When no global
quantum or rate is enforce with settings, the last updated node property
is used as the quantum.

Make jack use the force-quantum property when set_buffersize is used to
make sure that the quantum is not just a suggestion but a hard forced
one. This makes it possible for ardour or other jack apps to raise the
quantum above the max-quantum but also ensure that it will not change
by any other application (unless other jack apps).

Fixes #2079
This commit is contained in:
Wim Taymans 2022-01-31 17:59:18 +01:00
parent 54d50b943f
commit 24c97b1c7e
5 changed files with 54 additions and 6 deletions

View file

@ -3997,6 +3997,7 @@ int jack_set_buffer_size (jack_client_t *client, jack_nframes_t nframes)
pw_thread_loop_lock(c->context.loop);
pw_properties_set(c->props, PW_KEY_NODE_LATENCY, latency);
pw_properties_setf(c->props, PW_KEY_NODE_FORCE_QUANTUM, "%u", nframes);
c->info.change_mask |= SPA_NODE_CHANGE_MASK_PROPS;
c->info.props = &c->props->dict;