diff options
author | Chris Robinson <[email protected]> | 2018-01-28 23:32:28 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-01-28 23:32:28 -0800 |
commit | a042dbf30524429b49adb63efda35f53054ae924 (patch) | |
tree | 6e905d8173f2db6dd41b2e9cb471a9c860c54279 /Alc/backends/winmm.c | |
parent | 328fd7329d1ae1554452d2d4b0384173c0f47079 (diff) |
Call the backend close method in the destructor
Diffstat (limited to 'Alc/backends/winmm.c')
-rw-r--r-- | Alc/backends/winmm.c | 2 |
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); |