[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 22/35] sdlaudio: fix samples vs. frames mix-up
From: |
Gerd Hoffmann |
Subject: |
[PULL 22/35] sdlaudio: fix samples vs. frames mix-up |
Date: |
Fri, 4 Mar 2022 15:21:10 +0100 |
From: Volker RĂ¼melin <vr_qemu@t-online.de>
Fix the same samples vs. frames mix-up that the previous commit
fixed for the PulseAudio backend.
Signed-off-by: Volker RĂ¼melin <vr_qemu@t-online.de>
Message-Id: <20220301191311.26695-15-vr_qemu@t-online.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
audio/sdlaudio.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/audio/sdlaudio.c b/audio/sdlaudio.c
index e605c787baf3..797b47bbddb1 100644
--- a/audio/sdlaudio.c
+++ b/audio/sdlaudio.c
@@ -347,11 +347,8 @@ static int sdl_init_out(HWVoiceOut *hw, struct audsettings
*as,
req.freq = as->freq;
req.format = aud_to_sdlfmt (as->fmt);
req.channels = as->nchannels;
- /*
- * This is wrong. SDL samples are QEMU frames. The buffer size will be
- * the requested buffer size multiplied by the number of channels.
- */
- req.samples = audio_buffer_samples(
+ /* SDL samples are QEMU frames */
+ req.samples = audio_buffer_frames(
qapi_AudiodevSdlPerDirectionOptions_base(spdo), as, 11610);
req.callback = sdl_callback_out;
req.userdata = sdl;
--
2.35.1
- [PULL 13/35] jackaudio: use more jack audio buffers, (continued)
- [PULL 13/35] jackaudio: use more jack audio buffers, Gerd Hoffmann, 2022/03/04
- [PULL 14/35] audio: copy playback stream in sequential order, Gerd Hoffmann, 2022/03/04
- [PULL 15/35] audio: add pcm_ops function table for capture backend, Gerd Hoffmann, 2022/03/04
- [PULL 16/35] Revert "audio: fix wavcapture segfault", Gerd Hoffmann, 2022/03/04
- [PULL 17/35] audio: restore mixing-engine playback buffer size, Gerd Hoffmann, 2022/03/04
- [PULL 19/35] dsoundaudio: reduce effective playback buffer size, Gerd Hoffmann, 2022/03/04
- [PULL 18/35] paaudio: reduce effective playback buffer size, Gerd Hoffmann, 2022/03/04
- [PULL 21/35] paaudio: fix samples vs. frames mix-up, Gerd Hoffmann, 2022/03/04
- [PULL 25/35] hw/i386: Improve bounds checking in OVMF table parsing, Gerd Hoffmann, 2022/03/04
- [PULL 20/35] ossaudio: reduce effective playback buffer size, Gerd Hoffmann, 2022/03/04
- [PULL 22/35] sdlaudio: fix samples vs. frames mix-up,
Gerd Hoffmann <=
- [PULL 23/35] hw/usb/redirect.c: Stop using qemu_oom_check(), Gerd Hoffmann, 2022/03/04
- [PULL 24/35] coreaudio: Notify error in coreaudio_init_out, Gerd Hoffmann, 2022/03/04
- [PULL 29/35] ui/console: fix texture leak when calling surface_gl_create_texture(), Gerd Hoffmann, 2022/03/04
- [PULL 27/35] docs: Add spec of OVMF GUIDed table for SEV guests, Gerd Hoffmann, 2022/03/04
- [PULL 28/35] ui/console: fix crash when using gl context with non-gl listeners, Gerd Hoffmann, 2022/03/04
- [PULL 30/35] ui: do not create a surface when resizing a GL scanout, Gerd Hoffmann, 2022/03/04
- [PULL 31/35] ui/clipboard: fix use-after-free regression, Gerd Hoffmann, 2022/03/04
- [PULL 32/35] ui/cocoa: Add Services menu, Gerd Hoffmann, 2022/03/04
- [PULL 26/35] hw/i386: Replace magic number with field length calculation, Gerd Hoffmann, 2022/03/04
- [PULL 33/35] softmmu/qdev-monitor: Add virtio-gpu-gl aliases, Gerd Hoffmann, 2022/03/04