[Top][All Lists]

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

Re: [Qemu-devel] [PATCH 19/25] paaudio: fix playback glitches

From: Marc-André Lureau
Subject: Re: [Qemu-devel] [PATCH 19/25] paaudio: fix playback glitches
Date: Fri, 21 Aug 2015 00:08:01 +0200


On Thu, Aug 6, 2015 at 8:28 PM, Kővágó, Zoltán <address@hidden> wrote:
> Pulseaudio normally assumes that when the server wants it, the client
> can generate the audio samples and send it right away.  Unfortunately
> this is not the case with QEMU -- it's up to the emulated system when
> does it generate the samples.  Buffering the samples and sending them
> from a background thread is just a workaround, that doesn't work too
> well.  Instead enable pa's compatibility support and let pa worry about
> the details.

Afaik, it's not a problem if the audio data is not available right
away (live sources): PulseAudio should deal with that. I think it will
simply silence and wait (but it could actually be smarter than that?)

PA_STREAM_EARLY_REQUESTS is going to make PA request data more
frequently (every minreq). I don't get why that would help here. It's
meant for bad behaving applications using usleep and such that aren't
fixable, not a solution for audio glitches.

If qemu produces too much data than what PA can consume, it should
drop the old data, and only play current audio (unfortunately, that
doesn't seem to be the case looking at audio_pcm_sw_write). If qemu
produces too little, it can still write whatever it has when it has

Could you provide a way to reproduce the glitch you experience or
explain more clearly how this flag helps?


> Signed-off-by: Kővágó, Zoltán <address@hidden>
> ---
>  audio/paaudio.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> diff --git a/audio/paaudio.c b/audio/paaudio.c
> index 2aee22f..3990a80 100644
> --- a/audio/paaudio.c
> +++ b/audio/paaudio.c
> @@ -510,10 +510,8 @@ static pa_stream *qpa_simple_new (
>      flags =
> -#endif
>      if (dev) {
>          /* don't move the stream if the user specified a sink/source */
>          flags |= PA_STREAM_DONT_MOVE;
> --
> 2.4.5

Marc-André Lureau

reply via email to

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