device-port: Fire a hook when the latency offset changes.

This change adds a new hook type: PA_CORE_HOOK_PORT_LATENCY_OFFSET_CHANGED
And it is fired when the port latency offset changes.
This commit is contained in:
poljar (Damir Jelić) 2013-01-17 20:55:17 +01:00 committed by Tanu Kaskinen
parent 56a3561803
commit 477d6b71b6
2 changed files with 2 additions and 0 deletions

View file

@ -116,6 +116,7 @@ typedef enum pa_core_hook {
PA_CORE_HOOK_CARD_PROFILE_ADDED,
PA_CORE_HOOK_PORT_AVAILABLE_CHANGED,
PA_CORE_HOOK_PORT_ADDED,
PA_CORE_HOOK_PORT_LATENCY_OFFSET_CHANGED,
PA_CORE_HOOK_MAX
} pa_core_hook_t;

View file

@ -127,4 +127,5 @@ void pa_device_port_set_latency_offset(pa_device_port *p, int64_t offset) {
pa_assert_se(core = p->core);
pa_subscription_post(core, PA_SUBSCRIPTION_EVENT_CARD|PA_SUBSCRIPTION_EVENT_CHANGE, p->card->index);
pa_hook_fire(&core->hooks[PA_CORE_HOOK_PORT_LATENCY_OFFSET_CHANGED], p);
}