[pulseaudio-discuss] [PATCH 1/2] module: Add PA_CORE_HOOK_MODULE_UNLOAD
Tanu Kaskinen
tanu.kaskinen at linux.intel.com
Wed Nov 12 02:13:28 PST 2014
---
src/pulsecore/core.h | 1 +
src/pulsecore/module.c | 2 ++
2 files changed, 3 insertions(+)
diff --git a/src/pulsecore/core.h b/src/pulsecore/core.h
index 1f9df73..db7308c 100644
--- a/src/pulsecore/core.h
+++ b/src/pulsecore/core.h
@@ -128,6 +128,7 @@ typedef enum pa_core_hook {
PA_CORE_HOOK_CARD_PROFILE_AVAILABLE_CHANGED,
PA_CORE_HOOK_PORT_AVAILABLE_CHANGED,
PA_CORE_HOOK_PORT_LATENCY_OFFSET_CHANGED,
+ PA_CORE_HOOK_MODULE_UNLOAD,
PA_CORE_HOOK_MAX
} pa_core_hook_t;
diff --git a/src/pulsecore/module.c b/src/pulsecore/module.c
index bee8a20..e495436 100644
--- a/src/pulsecore/module.c
+++ b/src/pulsecore/module.c
@@ -223,6 +223,8 @@ static void pa_module_free(pa_module *m) {
pa_log_info("Unloading \"%s\" (index: #%u).", m->name, m->index);
+ pa_hook_fire(&m->core->hooks[PA_CORE_HOOK_MODULE_UNLOAD], m);
+
if (m->done)
m->done(m);
--
1.9.3
More information about the pulseaudio-discuss
mailing list