Don't unlock the pulseaudio mainloop when mixing
Lock contention could cause a lengthy delay between mixing and writing the audio. There shouldn't be any risk of dead-locking as the device lock should never be held when the mainloop gets locked.
This commit is contained in:
parent
8304fc1bef
commit
f42f655ea9
@ -837,11 +837,9 @@ static ALuint PulseProc(ALvoid *param)
|
||||
buf = pa_xmalloc(newlen);
|
||||
free_func = pa_xfree;
|
||||
}
|
||||
pa_threaded_mainloop_unlock(data->loop);
|
||||
|
||||
aluMixData(Device, buf, newlen/frame_size);
|
||||
|
||||
pa_threaded_mainloop_lock(data->loop);
|
||||
pa_stream_write(data->stream, buf, newlen, free_func, 0, PA_SEEK_RELATIVE);
|
||||
len -= newlen;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user