[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 07/26] spiceaudio: update comment
From: |
Gerd Hoffmann |
Subject: |
[PULL 07/26] spiceaudio: update comment |
Date: |
Thu, 13 Oct 2022 08:52:05 +0200 |
From: Volker Rümelin <vr_qemu@t-online.de>
Replace a comment with a question with the answer.
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20220923183640.8314-7-vr_qemu@t-online.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
audio/spiceaudio.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/audio/spiceaudio.c b/audio/spiceaudio.c
index 22892a7b9d42..f52f3a8bbb66 100644
--- a/audio/spiceaudio.c
+++ b/audio/spiceaudio.c
@@ -242,7 +242,10 @@ static size_t line_in_read(HWVoiceIn *hw, void *buf,
size_t len)
uint64_t to_read = audio_rate_get_bytes(&hw->info, &in->rate, len) >> 2;
size_t ready = spice_server_record_get_samples(&in->sin, buf, to_read);
- /* XXX: do we need this? */
+ /*
+ * If the client didn't send new frames, it most likely disconnected.
+ * Generate silence in this case to avoid a stalled audio stream.
+ */
if (ready == 0) {
memset(buf, 0, to_read << 2);
ready = to_read;
--
2.37.3
- [PULL 00/26] Kraxel 20221013 patches, Gerd Hoffmann, 2022/10/13
- [PULL 01/26] audio: refactor code in audio_run_out(), Gerd Hoffmann, 2022/10/13
- [PULL 02/26] audio: fix GUS audio playback with out.mixing-engine=off, Gerd Hoffmann, 2022/10/13
- [PULL 03/26] audio: run downstream playback queue unconditionally, Gerd Hoffmann, 2022/10/13
- [PULL 04/26] alsaaudio: reduce playback latency, Gerd Hoffmann, 2022/10/13
- [PULL 06/26] spiceaudio: add a pcm_ops buffer_get_free function, Gerd Hoffmann, 2022/10/13
- [PULL 07/26] spiceaudio: update comment,
Gerd Hoffmann <=
- [PULL 08/26] audio: swap audio_rate_get_bytes() function parameters, Gerd Hoffmann, 2022/10/13
- [PULL 15/26] cirrus_vga: fix potential memory overflow, Gerd Hoffmann, 2022/10/13
- [PULL 23/26] qemu-edid: Restrict input parameter -d to avoid division by zero, Gerd Hoffmann, 2022/10/13
- [PULL 05/26] audio: add more audio rate control functions, Gerd Hoffmann, 2022/10/13
- [PULL 10/26] audio: refactor audio_get_avail(), Gerd Hoffmann, 2022/10/13
- [PULL 12/26] audio: prevent an integer overflow in resampling code, Gerd Hoffmann, 2022/10/13
- [PULL 16/26] docs: add firmware feature flags, Gerd Hoffmann, 2022/10/13
- [PULL 17/26] pci-ids: drop PCI_DEVICE_ID_VIRTIO_IOMMU, Gerd Hoffmann, 2022/10/13
- [PULL 22/26] ui/gtk: Fix the implicit mouse ungrabbing logic, Gerd Hoffmann, 2022/10/13
- [PULL 19/26] pci-ids: drop PCI_DEVICE_ID_VIRTIO_PMEM, Gerd Hoffmann, 2022/10/13