aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-08-13 19:19:16 -0700
committerChris Robinson <[email protected]>2009-08-13 19:19:16 -0700
commit826c641668a14c244bac30d61a681c6817461f80 (patch)
tree3ab88ab05af69dec3519138ffbdb6660816c4789
parent6ae845fd9ebb45237aab4b5478689926856c48ce (diff)
Hold the lock while finding a capture device to open
-rw-r--r--Alc/ALc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 25fa6733..042724eb 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -542,21 +542,21 @@ ALCAPI ALCdevice* ALCAPIENTRY alcCaptureOpenDevice(const ALCchar *deviceName, AL
pDevice->Frequency = frequency;
pDevice->Format = format;
+ SuspendContext(NULL);
for(i = 0;BackendList[i].Init;i++)
{
pDevice->Funcs = &BackendList[i].Funcs;
if(ALCdevice_OpenCapture(pDevice, deviceName, frequency, format, SampleSize))
{
- SuspendContext(NULL);
pDevice->next = g_pDeviceList;
g_pDeviceList = pDevice;
g_ulDeviceCount++;
- ProcessContext(NULL);
DeviceFound = ALC_TRUE;
break;
}
}
+ ProcessContext(NULL);
if(!DeviceFound)
{