From 51e9104e36075cfd967b107590e8ae86112d7b5f Mon Sep 17 00:00:00 2001 From: =?utf8?q?poljar=20=28Damir=20Jeli=C4=87=29?= Date: Thu, 28 Jun 2012 13:17:21 +0200 Subject: [PATCH] device-port: Send a subscription event when the offset changes. When the offset changes a subscription event should be sent to the relevant card. --- src/pulsecore/device-port.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/pulsecore/device-port.c b/src/pulsecore/device-port.c index 28879f76..9ea54e3d 100644 --- a/src/pulsecore/device-port.c +++ b/src/pulsecore/device-port.c @@ -116,6 +116,8 @@ void pa_device_port_hashmap_free(pa_hashmap *h) { void pa_device_port_set_latency_offset(pa_device_port *p, int64_t offset) { uint32_t state; + pa_core *core; + pa_card *card; pa_assert(p); @@ -139,4 +141,9 @@ void pa_device_port_set_latency_offset(pa_device_port *p, int64_t offset) { break; } } + + pa_assert_se(core = p->core); + PA_IDXSET_FOREACH(card, core->cards, state) + if (p == pa_hashmap_get(card->ports, p->name)) + pa_subscription_post(core, PA_SUBSCRIPTION_EVENT_CARD|PA_SUBSCRIPTION_EVENT_CHANGE, card->index); } -- 2.39.2