paaudio: send recorded data in smaller chunks
commitd9a8b27a7e9b6467ff1709ae8a44d816d90c4d71
authorVolker Rümelin <vr_qemu@t-online.de>
Sun, 10 Jan 2021 10:02:35 +0000 (10 11:02 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 15 Jan 2021 10:25:22 +0000 (15 11:25 +0100)
treef820225a717306a9c09c8e2c3cf76edb8922193f
parent00413ed9c2fff416b3c1ee94b2e968e9c564c7bd
paaudio: send recorded data in smaller chunks

Tell PulseAudio to send recorded audio data in smaller chunks
than timer_period, so there's a good chance that qemu can read
recorded audio data every time it looks for new data.

PulseAudio tries to send buffer updates at a fragsize / 2 rate.
With fragsize = timer_period / 2 * 3 the update rate is 75% of
timer_period. The lower limit for the recording buffer size
maxlength is fragsize * 2.

Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Message-id: 9315afe5-5958-c0b4-ea1e-14769511a9d5@t-online.de
Message-Id: <20210110100239.27588-19-vr_qemu@t-online.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
audio/paaudio.c