[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 15/15] sdlaudio: fix samples vs. frames mix-up
From: |
Volker Rümelin |
Subject: |
[PATCH 15/15] sdlaudio: fix samples vs. frames mix-up |
Date: |
Thu, 6 Jan 2022 10:23:32 +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>
---
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
- Re: [PATCH 01/15] audio: replace open-coded buffer arithmetic, (continued)
- [PATCH 04/15] audio: inline function audio_pcm_sw_get_rpos_in(), Volker Rümelin, 2022/01/06
- [PATCH 12/15] dsoundaudio: reduce effective playback buffer size, Volker Rümelin, 2022/01/06
- [PATCH 07/15] audio: copy playback stream in sequential order, Volker Rümelin, 2022/01/06
- [PATCH 02/15] audio: move function audio_pcm_hw_clip_out(), Volker Rümelin, 2022/01/06
- [PATCH 06/15] jackaudio: use more jack audio buffers, Volker Rümelin, 2022/01/06
- [PATCH 14/15] paaudio: fix samples vs. frames mix-up, Volker Rümelin, 2022/01/06
- [PATCH 10/15] audio: restore mixing-engine playback buffer size, Volker Rümelin, 2022/01/06
- [PATCH 05/15] paaudio: increase default latency to 46ms, Volker Rümelin, 2022/01/06
- [PATCH 15/15] sdlaudio: fix samples vs. frames mix-up,
Volker Rümelin <=
- [PATCH 03/15] audio: add function audio_pcm_hw_conv_in(), Volker Rümelin, 2022/01/06
- [PATCH 11/15] paaudio: reduce effective playback buffer size, Volker Rümelin, 2022/01/06
- Re: [PATCH 00/15] reduce audio playback latency, Christian Schoenebeck, 2022/01/09