All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kővágó Zoltán" <dirty.ice.hu@gmail.com>
To: "Volker Rümelin" <vr_qemu@t-online.de>,
	"Marc-André Lureau" <marcandre.lureau@gmail.com>
Cc: QEMU <qemu-devel@nongnu.org>, Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] pulseaudio: reduce 24s recording latency
Date: Sat, 12 Sep 2015 16:35:56 +0200	[thread overview]
Message-ID: <55F4384C.1050707@gmail.com> (raw)
In-Reply-To: <55F40B4C.5000101@t-online.de>

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	other threads:[~2015-09-12 14:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-11 19:03 [Qemu-devel] [PATCH] pulseaudio: reduce 24s recording latency Volker Rümelin
2015-09-11 23:22 ` Marc-André Lureau
2015-09-12 11:23   ` Volker Rümelin
2015-09-12 14:35     ` Kővágó Zoltán [this message]
2015-09-12 19:55       ` Volker Rümelin
2015-09-12 12:07 ` Marc-André Lureau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55F4384C.1050707@gmail.com \
    --to=dirty.ice.hu@gmail.com \
    --cc=kraxel@redhat.com \
    --cc=marcandre.lureau@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=vr_qemu@t-online.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.