mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-09-06 18:05:37 +00:00
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>
This commit is contained in:
parent
acf7a70598
commit
7b67252807
|
@ -347,11 +347,8 @@ static int sdl_init_out(HWVoiceOut *hw, struct audsettings *as,
|
||||||
req.freq = as->freq;
|
req.freq = as->freq;
|
||||||
req.format = aud_to_sdlfmt (as->fmt);
|
req.format = aud_to_sdlfmt (as->fmt);
|
||||||
req.channels = as->nchannels;
|
req.channels = as->nchannels;
|
||||||
/*
|
/* SDL samples are QEMU frames */
|
||||||
* This is wrong. SDL samples are QEMU frames. The buffer size will be
|
req.samples = audio_buffer_frames(
|
||||||
* the requested buffer size multiplied by the number of channels.
|
|
||||||
*/
|
|
||||||
req.samples = audio_buffer_samples(
|
|
||||||
qapi_AudiodevSdlPerDirectionOptions_base(spdo), as, 11610);
|
qapi_AudiodevSdlPerDirectionOptions_base(spdo), as, 11610);
|
||||||
req.callback = sdl_callback_out;
|
req.callback = sdl_callback_out;
|
||||||
req.userdata = sdl;
|
req.userdata = sdl;
|
||||||
|
|
Loading…
Reference in a new issue