mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-09-30 05:05:27 +00:00
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:
parent
6c32b50ccd
commit
fcde479a82
|
@ -52,9 +52,8 @@ applications:
|
|||
the samplerate.
|
||||
* `PIPEWIRE_RATE=<num/denom>` to configure a rate for the graph.
|
||||
* `PIPEWIRE_QUANTUM=<num/denom>` 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=<id>` to request a link to the specified node. The
|
||||
id can be a node.name or object.serial of the target node.
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue