diff --git a/README.md b/README.md index 612f500e7..6282e8f70 100644 --- a/README.md +++ b/README.md @@ -52,9 +52,8 @@ applications: the samplerate. * `PIPEWIRE_RATE=` to configure a rate for the graph. * `PIPEWIRE_QUANTUM=` to configure latency as a fraction and a - samplerate. This function will attempt to change - the graph samplerate to `denom` and use the - specified `num` as the buffer size. + samplerate. This function will force the graph samplerate to + `denom` and force the specified `num` as the buffer size. * `PIPEWIRE_NODE=` to request a link to the specified node. The id can be a node.name or object.serial of the target node. diff --git a/pipewire-jack/src/pipewire-jack.c b/pipewire-jack/src/pipewire-jack.c index 529b1bde9..04009cf5e 100644 --- a/pipewire-jack/src/pipewire-jack.c +++ b/pipewire-jack/src/pipewire-jack.c @@ -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); } diff --git a/src/pipewire/filter.c b/src/pipewire/filter.c index 60d912383..3d06c7d35 100644 --- a/src/pipewire/filter.c +++ b/src/pipewire/filter.c @@ -1659,10 +1659,10 @@ pw_filter_connect(struct pw_filter *filter, 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(filter->properties, PW_KEY_NODE_RATE, + pw_properties_setf(filter->properties, PW_KEY_NODE_FORCE_RATE, "1/%u", q.denom); - pw_properties_setf(filter->properties, PW_KEY_NODE_LATENCY, - "%u/%u", q.num, q.denom); + pw_properties_setf(filter->properties, PW_KEY_NODE_FORCE_QUANTUM, + "%u", q.num); } } if ((str = getenv("PIPEWIRE_LATENCY")) != NULL) diff --git a/src/pipewire/stream.c b/src/pipewire/stream.c index aceacfe12..25051d64f 100644 --- a/src/pipewire/stream.c +++ b/src/pipewire/stream.c @@ -2034,10 +2034,10 @@ pw_stream_connect(struct pw_stream *stream, 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(stream->properties, PW_KEY_NODE_RATE, + pw_properties_setf(stream->properties, PW_KEY_NODE_FORCE_RATE, "1/%u", q.denom); - pw_properties_setf(stream->properties, PW_KEY_NODE_LATENCY, - "%u/%u", q.num, q.denom); + pw_properties_setf(stream->properties, PW_KEY_NODE_FORCE_QUANTUM, + "%u", q.num); } } if ((str = getenv("PIPEWIRE_LATENCY")) != NULL)