context: improve settings and defaults

Make structure with defaults that holds the defaults as they are loaded
from the config file or initialized with default values.

Copy this structure to a settings version that is used at runtime.

Add a force-quantum and force-rate field in the settings that can be
used to force a quantum and samplerate if != 0.
This commit is contained in:
Wim Taymans 2021-06-14 17:05:13 +02:00
parent 2ad202b8e8
commit d8ad87fd09
8 changed files with 70 additions and 46 deletions

View file

@ -2796,8 +2796,8 @@ jack_client_t * jack_client_open (const char *client_name,
if (client->context.context == NULL)
goto no_props;
client->allow_mlock = client->context.context->defaults.mem_allow_mlock;
client->warn_mlock = client->context.context->defaults.mem_warn_mlock;
client->allow_mlock = client->context.context->settings.mem_allow_mlock;
client->warn_mlock = client->context.context->settings.mem_warn_mlock;
if ((str = pw_context_get_conf_section(client->context.context,
"jack.properties")) != NULL)