mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
device-port: Send a subscription event when the offset changes.
When the offset changes a subscription event should be sent to the relevant card.
This commit is contained in:
parent
e9fd829877
commit
51e9104e36
1 changed files with 7 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue