qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] pulseaudio: reduce 24s recording latency


From: Kővágó Zoltán
Subject: Re: [Qemu-devel] [PATCH] pulseaudio: reduce 24s recording latency
Date: Sat, 12 Sep 2015 16:35:56 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0

2015-09-12 13:23 keltezéssel, Volker Rümelin írta:
Hi,

Am 12.09.2015 um 01:22 schrieb Marc-André Lureau:

Current code doesn't provide pulseaudio buffer attributes for
recording. Without buffer attributes pulseaudio uses a default
buffer of 4MB. 4MB is approximately 24s 16bit stereo audio
data at 44.1kHz.
Why isn't the buffer processed as soon as some data is available?



On start up qemu opens a connection to pulseaudio in function
qpa_init_in and pulseaudio immediately starts recording to the 4MB
ringbuffer. The qemu guest, Windows 8.1 in my case, doesn't consume that
data if there is no process listening on the audio interface. Now if the
guest starts recording, it will see audio data which was recorded 24s ago.

Weird, pulseaudio shouldn't delay the input more than 2 seconds in the default config. Maybe PA_STREAM_EARLY_REQUESTS help. See my patch at [1]. Alternatively we should maybe call pa_stream_flush when enabling the input to tell pulseaudio to drop previously recorded samples.

[1]: https://lists.gnu.org/archive/html/qemu-devel/2015-08/msg02455.html

Zoltan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]