summaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include/alMain.h
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32/Include/alMain.h')
-rw-r--r--OpenAL32/Include/alMain.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index b8057fa1..3cc82617 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -758,10 +758,16 @@ void AppendDeviceList(const ALCchar *name);
void AppendAllDeviceList(const ALCchar *name);
void AppendCaptureDeviceList(const ALCchar *name);
-ALCvoid LockDevice(ALCdevice *device);
-ALCvoid UnlockDevice(ALCdevice *device);
-ALCvoid LockContext(ALCcontext *context);
-ALCvoid UnlockContext(ALCcontext *context);
+static __inline void LockDevice(ALCdevice *device)
+{ EnterCriticalSection(&device->Mutex); }
+static __inline void UnlockDevice(ALCdevice *device)
+{ LeaveCriticalSection(&device->Mutex); }
+
+static __inline void LockContext(ALCcontext *context)
+{ LockDevice(context->Device); }
+static __inline void UnlockContext(ALCcontext *context)
+{ UnlockDevice(context->Device); }
+
ALvoid *StartThread(ALuint (*func)(ALvoid*), ALvoid *ptr);
ALuint StopThread(ALvoid *thread);