From 477d6b71b68bc00224e880e2cd99f0498917171e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?poljar=20=28Damir=20Jeli=C4=87=29?= Date: Thu, 17 Jan 2013 20:55:17 +0100 Subject: [PATCH] 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. --- src/pulsecore/core.h | 1 + src/pulsecore/device-port.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/pulsecore/core.h b/src/pulsecore/core.h index cf7cc1198..2099bb0be 100644 --- a/src/pulsecore/core.h +++ b/src/pulsecore/core.h @@ -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; diff --git a/src/pulsecore/device-port.c b/src/pulsecore/device-port.c index 4ca26d9a1..fa78e08b4 100644 --- a/src/pulsecore/device-port.c +++ b/src/pulsecore/device-port.c @@ -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); }