summaryrefslogtreecommitdiffstats
path: root/polyp/polyplib-simple.c
diff options
context:
space:
mode:
Diffstat (limited to 'polyp/polyplib-simple.c')
-rw-r--r--polyp/polyplib-simple.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/polyp/polyplib-simple.c b/polyp/polyplib-simple.c
index 5cf52d06..aa6c88f5 100644
--- a/polyp/polyplib-simple.c
+++ b/polyp/polyplib-simple.c
@@ -99,6 +99,19 @@ static int iterate(struct pa_simple *p, int block, int *perror) {
} while (pa_context_is_pending(p->context));
+
+ while (pa_mainloop_deferred_pending(p->mainloop)) {
+
+ if (pa_mainloop_iterate(p->mainloop, 0, NULL) < 0) {
+ if (perror)
+ *perror = PA_ERROR_INTERNAL;
+ return -1;
+ }
+
+ if (check_error(p, perror) < 0)
+ return -1;
+ }
+
return 0;
}