summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/pulsecore/hook-list.c6
-rw-r--r--src/pulsecore/hook-list.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/src/pulsecore/hook-list.c b/src/pulsecore/hook-list.c
index 5f7a8665e..a00116d1f 100644
--- a/src/pulsecore/hook-list.c
+++ b/src/pulsecore/hook-list.c
@@ -121,3 +121,9 @@ pa_hook_result_t pa_hook_fire(pa_hook *hook, void *data) {
return result;
}
+
+pa_bool_t pa_hook_is_firing(pa_hook *hook) {
+ pa_assert(hook);
+
+ return hook->n_firing > 0;
+}
diff --git a/src/pulsecore/hook-list.h b/src/pulsecore/hook-list.h
index 8514cced3..86ce9d25d 100644
--- a/src/pulsecore/hook-list.h
+++ b/src/pulsecore/hook-list.h
@@ -71,4 +71,6 @@ void pa_hook_slot_free(pa_hook_slot *slot);
pa_hook_result_t pa_hook_fire(pa_hook *hook, void *data);
+pa_bool_t pa_hook_is_firing(pa_hook *hook);
+
#endif