def poll(self): lib.pa_mainloop_iterate(self.loop, 0, ffi.NULL) self.update()
def wait_for_operation(self, op): state = lib.pa_operation_get_state(op) while state == lib.PA_OPERATION_RUNNING: lib.pa_mainloop_iterate(self.loop, 0, ffi.NULL) state = lib.pa_operation_get_state(op)