• Gerd Hoffmann's avatar
    pulseaudio: process 1/4 buffer max at once · 6315633b
    Gerd Hoffmann authored
    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: default avatarGerd Hoffmann <kraxel@redhat.com>
    Signed-off-by: default avatarmalc <av1474@comtv.ru>
    6315633b
Name
Last commit
Last update
..
alsaaudio.c Loading commit data...
audio.c Loading commit data...
audio.h Loading commit data...
audio_int.h Loading commit data...
audio_pt_int.c Loading commit data...
audio_pt_int.h Loading commit data...
audio_template.h Loading commit data...
audio_win_int.c Loading commit data...
audio_win_int.h Loading commit data...
coreaudio.c Loading commit data...
dsound_template.h Loading commit data...
dsoundaudio.c Loading commit data...
esdaudio.c Loading commit data...
fmodaudio.c Loading commit data...
mixeng.c Loading commit data...
mixeng.h Loading commit data...
mixeng_template.h Loading commit data...
noaudio.c Loading commit data...
ossaudio.c Loading commit data...
paaudio.c Loading commit data...
rate_template.h Loading commit data...
sdlaudio.c Loading commit data...
spiceaudio.c Loading commit data...
wavaudio.c Loading commit data...
wavcapture.c Loading commit data...
winwaveaudio.c Loading commit data...