From: "munkyu.im" <munkyu.im@samsung.com>
To: qemu-devel@nongnu.org
Cc: "munkyu.im" <munkyu.im@samsung.com>
Subject: [Qemu-devel] [PATCH]] audio: previous audio buffer should be flushed
Date: Tue, 28 Aug 2012 16:42:06 +0900 [thread overview]
Message-ID: <1346139726-14886-1-git-send-email-munkyu.im@samsung.com> (raw)
Winwave audio backend has problem with pausing and restart audio out.
Unlike other backends, Winwave pausing API does not flush audio buffer.
As a result, the previous audio data are playedin front of
user expected sound when user restart audio.
So changes it to waveOutReset()
Signed-off-by: Munkyu Im <munkyu.im@samsung.com>
---
audio/winwaveaudio.c | 12 +++---------
1 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/audio/winwaveaudio.c b/audio/winwaveaudio.c
index 663abb9..72babbf 100644
--- a/audio/winwaveaudio.c
+++ b/audio/winwaveaudio.c
@@ -349,21 +349,15 @@ static int winwave_ctl_out (HWVoiceOut *hw, int cmd, ...)
else {
hw->poll_mode = 0;
}
- if (wave->paused) {
- mr = waveOutRestart (wave->hwo);
- if (mr != MMSYSERR_NOERROR) {
- winwave_logerr (mr, "waveOutRestart");
- }
- wave->paused = 0;
- }
+ wave->paused = 0;
}
return 0;
case VOICE_DISABLE:
if (!wave->paused) {
- mr = waveOutPause (wave->hwo);
+ mr = waveOutReset (wave->hwo);
if (mr != MMSYSERR_NOERROR) {
- winwave_logerr (mr, "waveOutPause");
+ winwave_logerr (mr, "waveOutReset");
}
else {
wave->paused = 1;
--
1.7.4.1
next reply other threads:[~2012-08-28 7:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-28 7:42 munkyu.im [this message]
2012-08-28 15:12 ` [Qemu-devel] [PATCH]] audio: previous audio buffer should be flushed malc
-- strict thread matches above, loose matches on Subject: below --
2012-08-27 10:53 [Qemu-devel] [PATCH] " munkyu.im
2012-08-27 10:53 ` munkyu.im
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=1346139726-14886-1-git-send-email-munkyu.im@samsung.com \
--to=munkyu.im@samsung.com \
--cc=qemu-devel@nongnu.org \
/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).