mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-14 21:52:18 -06:00
spiceaudio: update comment
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>
This commit is contained in:
parent
90320051ea
commit
70ded68b45
1 changed files with 4 additions and 1 deletions
|
@ -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;
|
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);
|
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) {
|
if (ready == 0) {
|
||||||
memset(buf, 0, to_read << 2);
|
memset(buf, 0, to_read << 2);
|
||||||
ready = to_read;
|
ready = to_read;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue