pulse-server: use NODE_RATE to suggest a graph rate

When the rate is in the allowed rates and the graph is idle, it
will switch to the new rate.
This commit is contained in:
Wim Taymans 2021-08-17 20:05:19 +02:00
parent cad64bc992
commit bf66a3b236

View file

@ -1440,6 +1440,7 @@ static int do_create_playback_stream(struct client *client, uint32_t command, ui
impl, format_id2name(ss.format), ss.rate, impl, format_id2name(ss.format), ss.rate,
ss.channels); ss.channels);
} }
pw_properties_setf(props, PW_KEY_NODE_RATE, "1/%u", ss.rate);
} }
if (m->offset != m->length) if (m->offset != m->length)
@ -1679,6 +1680,7 @@ static int do_create_record_stream(struct client *client, uint32_t command, uint
impl, format_id2name(ss.format), ss.rate, impl, format_id2name(ss.format), ss.rate,
ss.channels); ss.channels);
} }
pw_properties_setf(props, PW_KEY_NODE_RATE, "1/%u", ss.rate);
} }
if (m->offset != m->length) if (m->offset != m->length)
goto error_protocol; goto error_protocol;