Use the correct input channel for the compressor effect
[openal-soft.git] / Alc / fpu_modes.h
blobeb3059679c9a1e97df131ce9659dd23db93aba49
1 #ifndef FPU_MODES_H
2 #define FPU_MODES_H
4 #ifdef HAVE_FENV_H
5 #include <fenv.h>
6 #endif
9 typedef struct FPUCtl {
10 #if defined(__GNUC__) && defined(HAVE_SSE)
11 unsigned int sse_state;
12 #elif defined(HAVE___CONTROL87_2)
13 unsigned int state;
14 unsigned int sse_state;
15 #elif defined(HAVE__CONTROLFP)
16 unsigned int state;
17 #endif
18 } FPUCtl;
19 void SetMixerFPUMode(FPUCtl *ctl);
20 void RestoreFPUMode(const FPUCtl *ctl);
22 #ifdef __GNUC__
23 /* Use an alternate macro set with GCC to avoid accidental continue or break
24 * statements within the mixer mode.
26 #define START_MIXER_MODE() __extension__({ FPUCtl _oldMode; SetMixerFPUMode(&_oldMode)
27 #define END_MIXER_MODE() RestoreFPUMode(&_oldMode); })
28 #else
29 #define START_MIXER_MODE() do { FPUCtl _oldMode; SetMixerFPUMode(&_oldMode)
30 #define END_MIXER_MODE() RestoreFPUMode(&_oldMode); } while(0)
31 #endif
32 #define LEAVE_MIXER_MODE() RestoreFPUMode(&_oldMode)
34 #endif /* FPU_MODES_H */