From 13caae49b5067f05d7b5cf8ddeb6d345db8cf557 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 14 Sep 2023 11:03:39 +0200 Subject: [PATCH] pulse-server: avoid emitting changes for unused params Don't emit change events when latency or tag change, for example. --- src/modules/module-protocol-pulse/manager.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/modules/module-protocol-pulse/manager.c b/src/modules/module-protocol-pulse/manager.c index 76517f112..c298ab8d7 100644 --- a/src/modules/module-protocol-pulse/manager.c +++ b/src/modules/module-protocol-pulse/manager.c @@ -318,7 +318,7 @@ static void device_event_info(void *data, const struct pw_device_info *info) case SPA_PARAM_EnumRoute: changed++; break; - case SPA_PARAM_Route: + default: break; } add_param(&o->pending_list, info->params[i].seq, id, NULL); @@ -435,7 +435,16 @@ static void node_event_info(void *data, const struct pw_node_info *info) continue; info->params[i].user = 0; - changed++; + switch (id) { + case SPA_PARAM_Props: + case SPA_PARAM_PropInfo: + case SPA_PARAM_Format: + case SPA_PARAM_EnumFormat: + changed++; + break; + default: + break; + } add_param(&o->pending_list, info->params[i].seq, id, NULL); if (!(info->params[i].flags & SPA_PARAM_INFO_READ)) continue;