aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-09-29 04:03:18 -0700
committerChris Robinson <[email protected]>2011-09-29 04:03:18 -0700
commitf4925a0e6a1988a4274ab1c8928ba88f70b6c39a (patch)
treec61285d90931c5202243cc2ced271462921f0434 /Alc/ALu.c
parentb6b3ca6e6ffab6aa943c760be1290954190ae66e (diff)
Use inline functions to set/restore the FPU mode for mixer updates
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 19683653..f54b8e8e 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -952,15 +952,7 @@ ALvoid aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size)
int fpuState;
ALuint i, c;
-#if defined(HAVE_FESETROUND)
- fpuState = fegetround();
- fesetround(FE_TOWARDZERO);
-#elif defined(HAVE__CONTROLFP)
- fpuState = _controlfp(0, 0);
- (void)_controlfp(_RC_CHOP, _MCW_RC);
-#else
- (void)fpuState;
-#endif
+ fpuState = SetMixerFPUMode();
while(size > 0)
{
@@ -1098,11 +1090,7 @@ ALvoid aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size)
size -= SamplesToDo;
}
-#if defined(HAVE_FESETROUND)
- fesetround(fpuState);
-#elif defined(HAVE__CONTROLFP)
- _controlfp(fpuState, _MCW_RC);
-#endif
+ RestoreFPUMode(fpuState);
}