diff options
author | Volker RĂ¼melin <vr_qemu@t-online.de> | 2022-03-01 20:13:11 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2022-03-04 11:05:13 +0100 |
commit | 7b672528070ffe9c401d760c0edb75849d8e484e (patch) | |
tree | 72f9bdec995dda46dc0192d48f0852167b75a916 /audio/sdlaudio.c | |
parent | acf7a705980d157735242cf3bedabd2ef22c5384 (diff) |
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/sdlaudio.c')
-rw-r--r-- | audio/sdlaudio.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/audio/sdlaudio.c b/audio/sdlaudio.c index e605c787ba..797b47bbdd 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; |