From a8c3e7d2d2c21f5bd2a8e2b3afa2229d1d7e8476 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Wed, 8 Mar 2006 12:23:13 +0000 Subject: Make polypaudio plugin thread safe Add a mutex to make sure that the Polypaudio plugin is thread safe. Signed-off-by: Pierre Ossman --- polyp/polyp.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'polyp/polyp.c') diff --git a/polyp/polyp.c b/polyp/polyp.c index c6bc5e1..f10221c 100644 --- a/polyp/polyp.c +++ b/polyp/polyp.c @@ -174,7 +174,9 @@ int polyp_wait_operation(snd_polyp_t *p, pa_operation *o) assert(p && o && (p->state == POLYP_STATE_READY)); while (pa_operation_get_state(o) == PA_OPERATION_RUNNING) { + p->state = POLYP_STATE_POLLING; err = pa_mainloop_iterate(p->mainloop, 1, NULL); + p->state = POLYP_STATE_READY; if (err < 0) return err; } -- cgit