aboutsummaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authormalc <av1474@comtv.ru>2009-10-11 06:38:47 +0400
committermalc <av1474@comtv.ru>2009-10-11 06:38:47 +0400
commit875ef647b03ba0db7656eaf9da66d1e906f2b38d (patch)
tree10ddca70a111691b9b4ba7a95f37e52d5cb13967 /audio
parentf4e8d0b737e2643fafc5193ab14cc126a246a884 (diff)
downloadqemu-875ef647b03ba0db7656eaf9da66d1e906f2b38d.zip
qemu-875ef647b03ba0db7656eaf9da66d1e906f2b38d.tar.gz
qemu-875ef647b03ba0db7656eaf9da66d1e906f2b38d.tar.bz2
winwave: close event handle and delete wait object after closing HWAVEOUT
To avoid possibly being called back and thus racing. Signed-off-by: malc <av1474@comtv.ru>
Diffstat (limited to 'audio')
-rw-r--r--audio/winwaveaudio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/audio/winwaveaudio.c b/audio/winwaveaudio.c
index 5bbce2a..1486da1 100644
--- a/audio/winwaveaudio.c
+++ b/audio/winwaveaudio.c
@@ -263,6 +263,8 @@ static void winwave_fini_out (HWVoiceOut *hw)
{
WaveVoiceOut *wave = (WaveVoiceOut *) hw;
+ winwave_anal_close_out (wave);
+
if (wave->event) {
qemu_del_wait_object (wave->event, winwave_poll_out, wave);
if (!CloseHandle (wave->event)) {
@@ -271,8 +273,6 @@ static void winwave_fini_out (HWVoiceOut *hw)
wave->event = NULL;
}
- winwave_anal_close_out (wave);
-
qemu_free (wave->pcm_buf);
wave->pcm_buf = NULL;