From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Volker Rümelin" <vr_qemu@t-online.de>,
"Gerd Hoffmann" <kraxel@redhat.com>
Subject: [PULL 1/4] dsoundaudio: fix never-ending playback loop
Date: Tue, 7 Apr 2020 11:22:03 +0200 [thread overview]
Message-ID: <20200407092207.6079-2-kraxel@redhat.com> (raw)
In-Reply-To: <20200407092207.6079-1-kraxel@redhat.com>
From: Volker Rümelin <vr_qemu@t-online.de>
Currently the DirectSound backend fails to stop audio playback
in dsound_enable_out(). To detect a lost buffer condition
dsound_get_status_out() incorrectly uses the error code
DSERR_BUFFERLOST instead of flag DSBSTATUS_BUFFERLOST as a mask
and returns with an error. As a result dsound_enable_out()
returns early and doesn't stop playback.
To reproduce the bug start qemu on a Windows host with
-soundhw pcspk -audiodev dsound,id=audio0. On the guest
FreeDOS 1.2 command line enter beep. The image Day 1 - F-Bird
from the QEMU Advent Calendar 2018 shows the bug as well.
Buglink: https://bugs.launchpad.net/qemu/+bug/1699628
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Message-id: 20200405075017.9901-1-vr_qemu@t-online.de
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
audio/dsoundaudio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/audio/dsoundaudio.c b/audio/dsoundaudio.c
index bd57082a8dce..9e621c889954 100644
--- a/audio/dsoundaudio.c
+++ b/audio/dsoundaudio.c
@@ -279,7 +279,7 @@ static int dsound_get_status_out (LPDIRECTSOUNDBUFFER dsb, DWORD *statusp,
return -1;
}
- if (*statusp & DSERR_BUFFERLOST) {
+ if (*statusp & DSBSTATUS_BUFFERLOST) {
dsound_restore_out(dsb, s);
return -1;
}
--
2.18.2
next prev parent reply other threads:[~2020-04-07 9:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-07 9:22 [PULL 0/4] Fixes 20200407 patches Gerd Hoffmann
2020-04-07 9:22 ` Gerd Hoffmann [this message]
2020-04-07 9:22 ` [PULL 2/4] dsoundaudio: fix "Could not lock capture buffer" warning Gerd Hoffmann
2020-04-07 9:22 ` [PULL 3/4] dsoundaudio: dsound_get_buffer_in should honor *size Gerd Hoffmann
2020-04-07 9:22 ` [PULL 4/4] ati-vga: Fix checks in ati_2d_blt() to avoid crash Gerd Hoffmann
2020-04-07 14:09 ` [PULL 0/4] Fixes 20200407 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=20200407092207.6079-2-kraxel@redhat.com \
--to=kraxel@redhat.com \
--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).