aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-01-11 03:57:49 -0800
committerChris Robinson <[email protected]>2010-01-11 03:57:49 -0800
commit1a57f095e8970f11edccd6f122b7a87391b04166 (patch)
treecc04be25a71fa68e84964146cb5c23d165b12bea /Alc
parentac9c2e8c4a04703a58325164e530140d9f8c4d85 (diff)
Hold global lock during mixing only when iterating device contexts
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALu.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 6d91dd6c..4a53c6ec 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -1247,8 +1247,6 @@ ALvoid aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size)
int fpuState;
ALuint i, c;
- SuspendContext(NULL);
-
#if defined(HAVE_FESETROUND)
fpuState = fegetround();
fesetround(FE_TOWARDZERO);
@@ -1268,6 +1266,7 @@ ALvoid aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size)
/* Clear mixing buffer */
memset(DryBuffer, 0, SamplesToDo*OUTPUTCHANNELS*sizeof(ALfloat));
+ SuspendContext(NULL);
for(c = 0;c < device->NumContexts;c++)
{
ALContext = device->Contexts[c];
@@ -1288,6 +1287,7 @@ ALvoid aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size)
}
ProcessContext(ALContext);
}
+ ProcessContext(NULL);
//Post processing loop
ChanMap = device->DevChannels;
@@ -1396,8 +1396,6 @@ ALvoid aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size)
#elif defined(HAVE__CONTROLFP)
_controlfp(fpuState, 0xfffff);
#endif
-
- ProcessContext(NULL);
}
ALvoid aluHandleDisconnect(ALCdevice *device)