diff options
author | Chris Robinson <[email protected]> | 2017-07-13 22:30:39 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2017-07-13 22:30:39 -0700 |
commit | a535169bbdd6766cbc6b53188065fbee6d4da1bc (patch) | |
tree | 26fd1cf5cf1cd7220026a817180dd1f7583d751b /Alc/ALc.c | |
parent | 22d77b87a3f103eeceec004cd9d053c17bf1b883 (diff) |
Use macros to set and restore the mixer FPU mode
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r-- | Alc/ALc.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -1741,7 +1741,6 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList) ALCsizei hrtf_id = -1; ALCcontext *context; ALCuint oldFreq; - FPUCtl oldMode; size_t size; ALCsizei i; int val; @@ -2244,7 +2243,7 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList) * allocated with the appropriate size. */ update_failed = AL_FALSE; - SetMixerFPUMode(&oldMode); + START_MIXER_MODE(); context = ATOMIC_LOAD_SEQ(&device->ContextList); while(context) { @@ -2359,7 +2358,7 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList) context = context->next; } - RestoreFPUMode(&oldMode); + END_MIXER_MODE(); if(update_failed) return ALC_INVALID_DEVICE; @@ -3662,11 +3661,10 @@ ALC_API ALCcontext* ALC_APIENTRY alcCreateContext(ALCdevice *device, const ALCin if(ALContext->DefaultSlot) { - FPUCtl oldMode; ALeffectslot *slot = ALContext->DefaultSlot; ALeffectState *state = slot->Effect.State; - SetMixerFPUMode(&oldMode); + START_MIXER_MODE(); state->OutBuffer = device->Dry.Buffer; state->OutChannels = device->Dry.NumChannels; if(V(state,deviceUpdate)(device) != AL_FALSE) @@ -3676,7 +3674,7 @@ ALC_API ALCcontext* ALC_APIENTRY alcCreateContext(ALCdevice *device, const ALCin DeinitEffectSlot(ALContext->DefaultSlot); ALContext->DefaultSlot = NULL; } - RestoreFPUMode(&oldMode); + END_MIXER_MODE(); } ALCdevice_IncRef(ALContext->Device); |