diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2011-01-24 22:07:44 +0100 |
---|---|---|
committer | malc <av1474@comtv.ru> | 2011-01-25 19:56:35 +0300 |
commit | 6315633b2535dc82dc1b3403f884b81e26b4c72c (patch) | |
tree | bf7f0f863058829cc9f973d29cca2efa37adf7b9 /iov.h | |
parent | d00b261816872d3e48adca584fca80ca21985f3b (diff) | |
download | hqemu-6315633b2535dc82dc1b3403f884b81e26b4c72c.zip hqemu-6315633b2535dc82dc1b3403f884b81e26b4c72c.tar.gz |
pulseaudio: process 1/4 buffer max at once
Limit the size of data pieces processed by the pulseaudio worker
threads. Never ever process more than 1/4 of the buffer at once.
Background: The buffer area currently processed by the pulseaudio thread
is blocked, i.e. the main thread (or iothread) can't fill in more data
there. The buffer processing time is roughly real-time due to the
pa_simple_write() call blocking when the output queue to the pulse
server is full. Thus processing big chunks at once means blocking
a large part of the buffer for a long time. This brings high latency
and can lead to dropouts.
When processing the buffer in smaller chunks the rpos handling becomes a
problem though. The thread reads hw->rpos without knowing whenever
qpa_run_out has already seen the last (small) chunk processed and
updated rpos accordingly. There is no point in reading hw->rpos though,
pa->rpos can be used instead. We just need to take care to initialize
pa->rpos before kicking the thread.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: malc <av1474@comtv.ru>
Diffstat (limited to 'iov.h')
0 files changed, 0 insertions, 0 deletions