diff options
author | Chris Robinson <[email protected]> | 2010-07-31 16:07:04 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2010-07-31 16:07:04 -0700 |
commit | 40ba9db4066369d77648760b3b6919249e22f519 (patch) | |
tree | 5200c1c7be36ea2e75ec8195077184c88937f4d1 /Alc/pulseaudio.c | |
parent | f1f2941511dd6bc51ea23ea46401bd75f70ac72e (diff) |
Only call Pulse functions from under a lock
Diffstat (limited to 'Alc/pulseaudio.c')
-rw-r--r-- | Alc/pulseaudio.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Alc/pulseaudio.c b/Alc/pulseaudio.c index 92dfc417..c615dc2c 100644 --- a/Alc/pulseaudio.c +++ b/Alc/pulseaudio.c @@ -536,7 +536,6 @@ static ALuint PulseProc(ALvoid *param) ppa_threaded_mainloop_wait(data->loop); continue; } - ppa_threaded_mainloop_unlock(data->loop); while(len > 0) { @@ -552,13 +551,14 @@ static ALuint PulseProc(ALvoid *param) buf = ppa_xmalloc(newlen); free_func = ppa_xfree; } + ppa_threaded_mainloop_unlock(data->loop); aluMixData(Device, buf, newlen/data->frame_size); + + ppa_threaded_mainloop_lock(data->loop); ppa_stream_write(data->stream, buf, newlen, free_func, 0, PA_SEEK_RELATIVE); len -= newlen; } - - ppa_threaded_mainloop_lock(data->loop); } while(Device->Connected && !data->killNow); ppa_threaded_mainloop_unlock(data->loop); |