[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 15/15] sdlaudio: fix samples vs. frames mix-up
From: |
Volker Rümelin |
Subject: |
[PATCH v2 15/15] sdlaudio: fix samples vs. frames mix-up |
Date: |
Sat, 22 Jan 2022 13:57:45 +0100 |
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>
---
audio/sdlaudio.c | 7 ++-----
1 file 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;
--
2.31.1
- [PATCH v2 01/15] audio: replace open-coded buffer arithmetic, (continued)
- [PATCH v2 01/15] audio: replace open-coded buffer arithmetic, Volker Rümelin, 2022/01/22
- [PATCH v2 02/15] audio: move function audio_pcm_hw_clip_out(), Volker Rümelin, 2022/01/22
- [PATCH v2 03/15] audio: add function audio_pcm_hw_conv_in(), Volker Rümelin, 2022/01/22
- [PATCH v2 04/15] audio: inline function audio_pcm_sw_get_rpos_in(), Volker Rümelin, 2022/01/22
- [PATCH v2 07/15] audio: copy playback stream in sequential order, Volker Rümelin, 2022/01/22
- [PATCH v2 06/15] jackaudio: use more jack audio buffers, Volker Rümelin, 2022/01/22
- [PATCH v2 08/15] audio: add pcm_ops function table for capture backend, Volker Rümelin, 2022/01/22
- [PATCH v2 10/15] audio: restore mixing-engine playback buffer size, Volker Rümelin, 2022/01/22
- [PATCH v2 05/15] paaudio: increase default latency to 46ms, Volker Rümelin, 2022/01/22
- [PATCH v2 09/15] Revert "audio: fix wavcapture segfault", Volker Rümelin, 2022/01/22
- [PATCH v2 15/15] sdlaudio: fix samples vs. frames mix-up,
Volker Rümelin <=
- [PATCH v2 14/15] paaudio: fix samples vs. frames mix-up, Volker Rümelin, 2022/01/22
- [PATCH v2 12/15] dsoundaudio: reduce effective playback buffer size, Volker Rümelin, 2022/01/22
- [PATCH v2 11/15] paaudio: reduce effective playback buffer size, Volker Rümelin, 2022/01/22
- [PATCH v2 13/15] ossaudio: reduce effective playback buffer size, Volker Rümelin, 2022/01/22