env: PIPEWIRE_QUANTUM now uses FORCE_RATE and FORCE_QUANTUM

Make it force a RATE and QUANTUM on the graph. The non-force options
can already be done with PIPEWIRE_RATE and PIPEWIRE_LATENCY.
This commit is contained in:
Wim Taymans 2023-10-10 15:10:19 +02:00
parent 6c32b50ccd
commit fcde479a82
4 changed files with 11 additions and 12 deletions

View file

@ -3804,10 +3804,10 @@ jack_client_t * jack_client_open (const char *client_name,
if ((str = getenv("PIPEWIRE_QUANTUM")) != NULL) {
struct spa_fraction q;
if (sscanf(str, "%u/%u", &q.num, &q.denom) == 2 && q.denom != 0) {
pw_properties_setf(client->props, PW_KEY_NODE_RATE,
pw_properties_setf(client->props, PW_KEY_NODE_FORCE_RATE,
"1/%u", q.denom);
pw_properties_setf(client->props, PW_KEY_NODE_LATENCY,
"%u/%u", q.num, q.denom);
pw_properties_setf(client->props, PW_KEY_NODE_FORCE_QUANTUM,
"%u", q.num);
} else {
pw_log_warn("invalid PIPEWIRE_QUANTUM: %s", str);
}