[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 03/23] sdlaudio: add -audiodev sdl, out.buffer-count option
From: |
Markus Armbruster |
Subject: |
Re: [PATCH 03/23] sdlaudio: add -audiodev sdl, out.buffer-count option |
Date: |
Fri, 15 Jan 2021 09:39:58 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
Volker Rümelin <vr_qemu@t-online.de> writes:
> Currently there is a crackling noise with SDL2 audio playback.
> Commit bcf19777df: "audio/sdlaudio: Allow audio playback with
> SDL2" already mentioned the crackling noise.
>
> Add an out.buffer-count option to give users a chance to select
> sane settings for glitch free audio playback. The idea was taken
> from the coreaudio backend.
>
> The in.buffer-count option will be used with one of the next
> patches.
>
> Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
> ---
[...]
> diff --git a/qapi/audio.json b/qapi/audio.json
> index 072ed79def..9cba0df8a4 100644
> --- a/qapi/audio.json
> +++ b/qapi/audio.json
> @@ -301,6 +301,37 @@
> '*out': 'AudiodevPaPerDirectionOptions',
> '*server': 'str' } }
>
> +##
> +# @AudiodevSdlPerDirectionOptions:
> +#
> +# Options of the SDL audio backend that are used for both playback and
> +# recording.
> +#
> +# @buffer-count: number of buffers (default 4)
> +#
> +# Since: 6.0
> +##
> +{ 'struct': 'AudiodevSdlPerDirectionOptions',
> + 'base': 'AudiodevPerDirectionOptions',
> + 'data': {
> + '*buffer-count': 'uint32' } }
> +
> +##
> +# @AudiodevSdlOptions:
> +#
> +# Options of the SDL audio backend.
> +#
> +# @in: options of the recording stream
> +#
> +# @out: options of the playback stream
> +#
> +# Since: 6.0
> +##
> +{ 'struct': 'AudiodevSdlOptions',
> + 'data': {
> + '*in': 'AudiodevSdlPerDirectionOptions',
> + '*out': 'AudiodevSdlPerDirectionOptions' } }
> +
> ##
> # @AudiodevWavOptions:
> #
> @@ -385,6 +416,6 @@
> 'jack': 'AudiodevJackOptions',
> 'oss': 'AudiodevOssOptions',
> 'pa': 'AudiodevPaOptions',
> - 'sdl': 'AudiodevGenericOptions',
> + 'sdl': 'AudiodevSdlOptions',
> 'spice': 'AudiodevGenericOptions',
> 'wav': 'AudiodevWavOptions' } }
> diff --git a/qemu-options.hx b/qemu-options.hx
> index 1698a0c751..4e02e9bd76 100644
> --- a/qemu-options.hx
> +++ b/qemu-options.hx
> @@ -588,6 +588,7 @@ DEF("audiodev", HAS_ARG, QEMU_OPTION_audiodev,
> #endif
> #ifdef CONFIG_AUDIO_SDL
> "-audiodev sdl,id=id[,prop[=value][,...]]\n"
> + " in|out.buffer-count= number of buffers\n"
> #endif
> #ifdef CONFIG_SPICE
> "-audiodev spice,id=id[,prop[=value][,...]]\n"
> @@ -745,7 +746,12 @@ SRST
> ``-audiodev sdl,id=id[,prop[=value][,...]]``
> Creates a backend using SDL. This backend is available on most
> systems, but you should use your platform's native backend if
> - possible. This backend has no backend specific properties.
> + possible.
> +
> + SDL specific options are:
> +
> + ``in|out.buffer-count=count``
> + Sets the count of the buffers.
>
> ``-audiodev spice,id=id[,prop[=value][,...]]``
> Creates a backend that sends audio through SPICE. This backend
These parts:
Acked-by: Markus Armbruster <armbru@redhat.com>
- [PATCH 05/23] sdlaudio: always clear the sample buffer, (continued)
- [PATCH 05/23] sdlaudio: always clear the sample buffer, Volker Rümelin, 2021/01/10
- [PATCH 06/23] sdlaudio: fill remaining sample buffer with silence, Volker Rümelin, 2021/01/10
- [PATCH 07/23] sdlaudio: replace legacy functions with modern ones, Volker Rümelin, 2021/01/10
- [PATCH 03/23] sdlaudio: add -audiodev sdl,out.buffer-count option, Volker Rümelin, 2021/01/10
- [PATCH 10/23] audio: break generic buffer dependency on mixing-engine, Volker Rümelin, 2021/01/10
- [PATCH 08/23] audio: split pcm_ops function get_buffer_in, Volker Rümelin, 2021/01/10
- [PATCH 09/23] sdlaudio: add recording functions, Volker Rümelin, 2021/01/10
- [PATCH 11/23] sdlaudio: enable (in|out).mixing-engine=off, Volker Rümelin, 2021/01/10
- [PATCH 13/23] paaudio: avoid to clip samples multiple times, Volker Rümelin, 2021/01/10
- [PATCH 14/23] paaudio: wait for PA_STREAM_READY in qpa_write(), Volker Rümelin, 2021/01/10
- [PATCH 15/23] paaudio: wait until the playback stream is ready, Volker Rümelin, 2021/01/10
- [PATCH 12/23] audio: remove remaining unused plive code, Volker Rümelin, 2021/01/10
- [PATCH 16/23] paaudio: remove unneeded code, Volker Rümelin, 2021/01/10
- [PATCH 18/23] paaudio: limit minreq to 75% of audio timer_rate, Volker Rümelin, 2021/01/10