]> code.delx.au - pulseaudio/blobdiff - src/pulsecore/hook-list.c
Merge remote branch 'mkbosmans/rate-adjustment'
[pulseaudio] / src / pulsecore / hook-list.c
index 5f7a8665edfa7c9b72c8485dce90e1f674358f92..d9b9917d40f9916efa674dd21a688da30792caa3 100644 (file)
@@ -97,7 +97,7 @@ pa_hook_result_t pa_hook_fire(pa_hook *hook, void *data) {
 
     hook->n_firing ++;
 
-    for (slot = hook->slots; slot; slot = slot->next) {
+    PA_LLIST_FOREACH(slot, hook->slots) {
         if (slot->dead)
             continue;
 
@@ -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;
+}