LADI
/
spa
1
Fork 0

stream: ignore latency of monitor stream ports

Have monitor streams not affect the latency calculation of the ports
they are connected to.

Connecting monitor streams to ports (e.g. volume level monitoring)
should not affect latency values of other streams connected to those
ports.

This fixes e.g. just running pavucontrol from modifying latencies of all
existing ports.
This commit is contained in:
Pauli Virtanen 2023-05-03 19:21:43 +03:00 committed by Wim Taymans
parent 6e17962ad0
commit 55fc2ac7ef
2 changed files with 5 additions and 1 deletions

View File

@ -275,7 +275,10 @@ extern "C" {
#define PW_KEY_STREAM_LATENCY_MAX "stream.latency.max" /**< The maximum latency of the stream */
#define PW_KEY_STREAM_MONITOR "stream.monitor" /**< Indicates that the stream is monitoring
* and might select a less accurate but faster
* conversion algorithm. */
* conversion algorithm. Monitor streams are also
* ignored when calculating the latency of their peer
* ports (since 0.3.71).
*/
#define PW_KEY_STREAM_DONT_REMIX "stream.dont-remix" /**< don't remix channels */
#define PW_KEY_STREAM_CAPTURE_SINK "stream.capture.sink" /**< Try to capture the sink output instead of
* source output */

View File

@ -2012,6 +2012,7 @@ pw_stream_connect(struct pw_stream *stream,
pw_properties_parse_bool(str)) {
pw_properties_set(props, "resample.peaks", "true");
pw_properties_set(props, "channelmix.normalize", "true");
pw_properties_set(props, PW_KEY_PORT_IGNORE_LATENCY, "true");
}
if (impl->media_type == SPA_MEDIA_TYPE_audio) {