From 0865db564fa86df6c02ab10ec62cfbbe98f8c917 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 18 Aug 2012 15:58:04 -0700 Subject: Move the device lock into the backend function table For backend-specific implementations: this should hold the audio mixer loop for playback devices, and provide recursive mutex behavior. --- Alc/ALu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Alc/ALu.c') diff --git a/Alc/ALu.c b/Alc/ALu.c index 6c869d3d..d79661d1 100644 --- a/Alc/ALu.c +++ b/Alc/ALu.c @@ -921,7 +921,7 @@ ALvoid aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size) SamplesToDo = minu(size, BUFFERSIZE); memset(device->DryBuffer, 0, SamplesToDo*MaxChannels*sizeof(ALfloat)); - LockDevice(device); + ALCdevice_Lock(device); ctx = device->ContextList; while(ctx) { @@ -999,7 +999,7 @@ ALvoid aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size) for(i = 0;i < SamplesToDo;i++) (*slot)->WetBuffer[i] = 0.0f; } - UnlockDevice(device); + ALCdevice_Unlock(device); /* Click-removal. Could do better; this only really handles immediate * changes between updates where a predictive sample could be @@ -1092,7 +1092,7 @@ ALvoid aluHandleDisconnect(ALCdevice *device) { ALCcontext *Context; - LockDevice(device); + ALCdevice_Lock(device); device->Connected = ALC_FALSE; Context = device->ContextList; @@ -1117,5 +1117,5 @@ ALvoid aluHandleDisconnect(ALCdevice *device) Context = Context->next; } - UnlockDevice(device); + ALCdevice_Unlock(device); } -- cgit v1.2.3