aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 1858c29b..2e9dc710 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -4401,6 +4401,12 @@ ALC_API ALCboolean ALC_APIENTRY alcCaptureCloseDevice(ALCdevice *device)
}
UnlockLists();
+ almtx_lock(&device->BackendLock);
+ if((device->Flags&DEVICE_RUNNING))
+ V0(device->Backend,stop)();
+ device->Flags &= ~DEVICE_RUNNING;
+ almtx_unlock(&device->BackendLock);
+
ALCdevice_DecRef(device);
return ALC_TRUE;