[pulseaudio-discuss] [PATCH 4/5] device-port: Fire a hook when the latency offset changes.
poljar (Damir Jelić)
poljarinho at gmail.com
Thu Jan 17 11:55:17 PST 2013
This change adds a new hook type: PA_CORE_HOOK_PORT_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 cf7cc11..ad289ff 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_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 4ca26d9..8b4cdd6 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_OFFSET_CHANGED], p);
}
--
1.8.1.1
More information about the pulseaudio-discuss
mailing list