aboutsummaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorVolker RĂ¼melin <vr_qemu@t-online.de>2022-03-01 20:13:11 +0100
committerGerd Hoffmann <kraxel@redhat.com>2022-03-04 11:05:13 +0100
commit7b672528070ffe9c401d760c0edb75849d8e484e (patch)
tree72f9bdec995dda46dc0192d48f0852167b75a916 /audio
parentacf7a705980d157735242cf3bedabd2ef22c5384 (diff)
downloadqemu-7b672528070ffe9c401d760c0edb75849d8e484e.zip
qemu-7b672528070ffe9c401d760c0edb75849d8e484e.tar.gz
qemu-7b672528070ffe9c401d760c0edb75849d8e484e.tar.bz2
sdlaudio: fix samples vs. frames mix-up
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>
Diffstat (limited to 'audio')
-rw-r--r--audio/sdlaudio.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/audio/sdlaudio.c b/audio/sdlaudio.c
index e605c78..797b47b 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;