From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Alistair Francis" <alistair@alistair23.me>,
"Volker Rümelin" <vr_qemu@t-online.de>,
qemu-arm@nongnu.org, "Gerd Hoffmann" <kraxel@redhat.com>,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>
Subject: [PULL 1/3] audio: fix audio recording
Date: Thu, 21 Nov 2019 11:16:16 +0100 [thread overview]
Message-ID: <20191121101618.29289-2-kraxel@redhat.com> (raw)
In-Reply-To: <20191121101618.29289-1-kraxel@redhat.com>
From: Volker Rümelin <vr_qemu@t-online.de>
With current code audio recording with all audio backends
except PulseAudio and DirectSound is broken. The generic audio
recording buffer management forgot to update the current read
position after a read.
Fixes: ff095e5231 "audio: api for mixeng code free backends"
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Reviewed-by: Zoltán Kővágó <DirtY.iCE.hu@gmail.com>
Message-id: 2fc947cf-7b42-de68-3f11-cbcf1c096be9@t-online.de
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
audio/audio.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/audio/audio.c b/audio/audio.c
index 7fc3aa9d1637..56fae5504710 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -1390,6 +1390,7 @@ void *audio_generic_get_buffer_in(HWVoiceIn *hw, size_t *size)
size_t read = hw->pcm_ops->read(hw, hw->buf_emul + hw->pos_emul,
read_len);
hw->pending_emul += read;
+ hw->pos_emul = (hw->pos_emul + read) % hw->size_emul;
if (read < read_len) {
break;
}
--
2.18.1
next prev parent reply other threads:[~2019-11-21 10:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-21 10:16 [PULL 0/3] Fixes 20191121 patches Gerd Hoffmann
2019-11-21 10:16 ` Gerd Hoffmann [this message]
2019-11-21 10:16 ` [PULL 2/3] display: xlnx_dp: Provide sufficient bytes for silent audio channel Gerd Hoffmann
2019-11-21 10:16 ` [PULL 3/3] ui/gtk: fix gettext message's charset Gerd Hoffmann
2019-11-21 17:18 ` [PULL 0/3] Fixes 20191121 patches Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191121101618.29289-2-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=alistair@alistair23.me \
--cc=edgar.iglesias@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=vr_qemu@t-online.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).