[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 07/12] spiceaudio: update comment
From: |
Volker Rümelin |
Subject: |
[PATCH 07/12] spiceaudio: update comment |
Date: |
Fri, 23 Sep 2022 20:36:35 +0200 |
Replace a comment with a question with the answer.
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
---
audio/spiceaudio.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/audio/spiceaudio.c b/audio/spiceaudio.c
index 22892a7b9d..f52f3a8bbb 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.35.3
- Re: [PATCH 05/12] audio: add more audio rate control functions, (continued)
- [PATCH 03/12] audio: run downstream playback queue unconditionally, Volker Rümelin, 2022/09/23
- [PATCH 11/12] audio: fix sw->buf size for audio recording, Volker Rümelin, 2022/09/23
- [PATCH 10/12] audio: refactor audio_get_avail(), Volker Rümelin, 2022/09/23
- [PATCH 04/12] alsaaudio: reduce playback latency, Volker Rümelin, 2022/09/23
- [PATCH 12/12] audio: prevent an integer overflow in resampling code, Volker Rümelin, 2022/09/23
- [PATCH 07/12] spiceaudio: update comment,
Volker Rümelin <=
- [PATCH 09/12] audio: rename audio_sw_bytes_free(), Volker Rümelin, 2022/09/23
- [PATCH 06/12] spiceaudio: add a pcm_ops buffer_get_free function, Volker Rümelin, 2022/09/23
- [PATCH 08/12] audio: swap audio_rate_get_bytes() function parameters, Volker Rümelin, 2022/09/23