diff options
author | poljar (Damir Jelić) <poljarinho@gmail.com> | 2012-06-28 13:17:21 +0200 |
---|---|---|
committer | Tanu Kaskinen <tanuk@iki.fi> | 2012-06-30 13:49:29 +0300 |
commit | 51e9104e36075cfd967b107590e8ae86112d7b5f (patch) | |
tree | 3635f9c1b85a335778a2ac8cefa3533d6892a5ed | |
parent | e9fd8298776cb6cc31173ecf040817aab2d1da39 (diff) |
device-port: Send a subscription event when the offset changes.
When the offset changes a subscription event should be sent to the
relevant card.
-rw-r--r-- | src/pulsecore/device-port.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/pulsecore/device-port.c b/src/pulsecore/device-port.c index 28879f76d..9ea54e3d4 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); } |