aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/winmm.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/backends/winmm.c')
-rw-r--r--Alc/backends/winmm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Alc/backends/winmm.c b/Alc/backends/winmm.c
index 0fcab458..885b624c 100644
--- a/Alc/backends/winmm.c
+++ b/Alc/backends/winmm.c
@@ -475,6 +475,7 @@ static void ALCwinmmCapture_Construct(ALCwinmmCapture *self, ALCdevice *device)
static void ALCwinmmCapture_Destruct(ALCwinmmCapture *self)
{
+ ALCwinmmCapture_close(self);
if(self->InHdl)
waveInClose(self->InHdl);
self->InHdl = 0;
@@ -664,6 +665,7 @@ static void ALCwinmmCapture_close(ALCwinmmCapture *self)
int i;
/* Tell the processing thread to quit and wait for it to do so. */
+ if(self->killNow) return;
self->killNow = AL_TRUE;
PostThreadMessage(self->thread, WM_QUIT, 0, 0);