]> code.delx.au - pulseaudio/commitdiff
add pa_hook_is_firing
authorLennart Poettering <lennart@poettering.net>
Sat, 21 Mar 2009 00:18:48 +0000 (01:18 +0100)
committerLennart Poettering <lennart@poettering.net>
Sat, 21 Mar 2009 00:18:48 +0000 (01:18 +0100)
src/pulsecore/hook-list.c
src/pulsecore/hook-list.h

index 5f7a8665edfa7c9b72c8485dce90e1f674358f92..a00116d1ffda312bc773b859b1367c9f4ab68d7f 100644 (file)
@@ -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;
+}
index 8514cced3dbfff42701c829b7af19329a64e00aa..86ce9d25d8f622ae666478fe5b219250e456bee2 100644 (file)
@@ -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