summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authormalc2009-10-11 03:39:09 +0200
committermalc2009-10-11 03:39:14 +0200
commitf4e8d0b737e2643fafc5193ab14cc126a246a884 (patch)
tree06bedf4349c6a1e0a034de481605b0b5d526c0fa /audio
parentCRIS: Segmented addressing only for kernel mode. (diff)
downloadqemu-f4e8d0b737e2643fafc5193ab14cc126a246a884.tar.gz
qemu-f4e8d0b737e2643fafc5193ab14cc126a246a884.tar.xz
qemu-f4e8d0b737e2643fafc5193ab14cc126a246a884.zip
winwave: remove wait object when finalizing DAC voice
Signed-off-by: malc <av1474@comtv.ru>
Diffstat (limited to 'audio')
-rw-r--r--audio/winwaveaudio.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/audio/winwaveaudio.c b/audio/winwaveaudio.c
index 16133d198d..5bbce2abdc 100644
--- a/audio/winwaveaudio.c
+++ b/audio/winwaveaudio.c
@@ -253,30 +253,31 @@ static int winwave_run_out (HWVoiceOut *hw, int live)
return decr;
}
+static void winwave_poll_out (void *opaque)
+{
+ (void) opaque;
+ audio_run ("winwave_poll_out");
+}
+
static void winwave_fini_out (HWVoiceOut *hw)
{
WaveVoiceOut *wave = (WaveVoiceOut *) hw;
- winwave_anal_close_out (wave);
-
- qemu_free (wave->pcm_buf);
- wave->pcm_buf = NULL;
-
- qemu_free (wave->hdrs);
- wave->hdrs = NULL;
-
if (wave->event) {
+ qemu_del_wait_object (wave->event, winwave_poll_out, wave);
if (!CloseHandle (wave->event)) {
AUD_log (AUDIO_CAP, "CloseHandle failed %lx\n", GetLastError ());
}
wave->event = NULL;
}
-}
-static void winwave_poll_out (void *opaque)
-{
- (void) opaque;
- audio_run ("winwave_poll_out");
+ winwave_anal_close_out (wave);
+
+ qemu_free (wave->pcm_buf);
+ wave->pcm_buf = NULL;
+
+ qemu_free (wave->hdrs);
+ wave->hdrs = NULL;
}
static int winwave_ctl_out (HWVoiceOut *hw, int cmd, ...)