aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-11-01 15:55:18 -0700
committerChris Robinson <[email protected]>2014-11-01 15:55:18 -0700
commitc82f39decd4ec1f772f556cf38aa8afb83be41b3 (patch)
tree55d6563ae8074f0e0f9e1f2cfee5bbec8fc972f3
parent28c1ec830e4ee8d45370d5e4e7d5fb27160bca5c (diff)
Avoid the ALCdevice_Lock/Unlock wrapper in some places
-rw-r--r--Alc/ALu.c5
-rw-r--r--OpenAL32/alState.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 78604c1a..71804a3f 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -36,6 +36,7 @@
#include "hrtf.h"
#include "static_assert.h"
+#include "backends/base.h"
#include "midi/base.h"
@@ -1134,7 +1135,7 @@ ALvoid aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size)
for(c = 0;c < MaxChannels;c++)
memset(device->DryBuffer[c], 0, SamplesToDo*sizeof(ALfloat));
- ALCdevice_Lock(device);
+ V0(device->Backend,lock)();
V(device->Synth,process)(SamplesToDo, device->DryBuffer);
ctx = ATOMIC_LOAD(&device->ContextList);
@@ -1213,7 +1214,7 @@ ALvoid aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size)
device->SamplesDone += SamplesToDo;
device->ClockBase += (device->SamplesDone/device->Frequency) * DEVICE_CLOCK_RES;
device->SamplesDone %= device->Frequency;
- ALCdevice_Unlock(device);
+ V0(device->Backend,unlock)();
if(device->Bs2b)
{
diff --git a/OpenAL32/alState.c b/OpenAL32/alState.c
index 180a8c04..f2f25f97 100644
--- a/OpenAL32/alState.c
+++ b/OpenAL32/alState.c
@@ -30,6 +30,7 @@
#include "alAuxEffectSlot.h"
#include "alMidi.h"
+#include "backends/base.h"
#include "midi/base.h"
@@ -346,9 +347,9 @@ AL_API ALint64SOFT AL_APIENTRY alGetInteger64SOFT(ALenum pname)
case AL_MIDI_CLOCK_SOFT:
device = context->Device;
- ALCdevice_Lock(device);
+ V0(device->Backend,lock)();
value = MidiSynth_getTime(device->Synth);
- ALCdevice_Unlock(device);
+ V0(device->Backend,unlock)();
break;
case AL_SOUNDFONTS_SIZE_SOFT: