diff options
-rw-r--r-- | Alc/ALu.c | 12 | ||||
-rw-r--r-- | Alc/alcModulator.c | 10 |
2 files changed, 9 insertions, 13 deletions
@@ -1143,7 +1143,7 @@ another_source: const int chans2[] = { BACK_LEFT, SIDE_LEFT, BACK_RIGHT, SIDE_RIGHT }; - const ALfloat scaler = aluSqrt(1.0f/Channels); + const ALfloat scaler = 1.0f/Channels; const ALfloat dupscaler = aluSqrt(1.0f/3.0f); #define DO_MIX(resampler) do { \ @@ -1195,7 +1195,7 @@ another_source: const int chans[] = { FRONT_LEFT, FRONT_RIGHT }; - const ALfloat scaler = aluSqrt(1.0f/Channels); + const ALfloat scaler = 1.0f/Channels; #define DO_MIX(resampler) do { \ while(BufferSize--) \ @@ -1244,7 +1244,7 @@ another_source: FRONT_LEFT, FRONT_RIGHT, BACK_LEFT, BACK_RIGHT }; - const ALfloat scaler = aluSqrt(1.0f/Channels); + const ALfloat scaler = 1.0f/Channels; switch(Resampler) { @@ -1266,7 +1266,7 @@ another_source: FRONT_CENTER, LFE, BACK_LEFT, BACK_RIGHT }; - const ALfloat scaler = aluSqrt(1.0f/Channels); + const ALfloat scaler = 1.0f/Channels; switch(Resampler) { @@ -1289,7 +1289,7 @@ another_source: BACK_CENTER, SIDE_LEFT, SIDE_RIGHT }; - const ALfloat scaler = aluSqrt(1.0f/Channels); + const ALfloat scaler = 1.0f/Channels; switch(Resampler) { @@ -1312,7 +1312,7 @@ another_source: BACK_LEFT, BACK_RIGHT, SIDE_LEFT, SIDE_RIGHT }; - const ALfloat scaler = aluSqrt(1.0f/Channels); + const ALfloat scaler = 1.0f/Channels; switch(Resampler) { diff --git a/Alc/alcModulator.c b/Alc/alcModulator.c index c6891282..cabbaeb6 100644 --- a/Alc/alcModulator.c +++ b/Alc/alcModulator.c @@ -40,8 +40,6 @@ typedef struct ALmodulatorState { SQUARE } Waveform; - ALfloat scalar; - ALuint index; ALuint step; @@ -89,11 +87,9 @@ static ALvoid ModulatorDestroy(ALeffectState *effect) static ALboolean ModulatorDeviceUpdate(ALeffectState *effect, ALCdevice *Device) { - ALmodulatorState *state = (ALmodulatorState*)effect; - - state->scalar = aluSqrt(1.0f/Device->NumChan); - return AL_TRUE; + (void)effect; + (void)Device; } static ALvoid ModulatorUpdate(ALeffectState *effect, ALCcontext *Context, const ALeffect *Effect) @@ -121,7 +117,7 @@ static ALvoid ModulatorUpdate(ALeffectState *effect, ALCcontext *Context, const static ALvoid ModulatorProcess(ALeffectState *effect, const ALeffectslot *Slot, ALuint SamplesToDo, const ALfloat *SamplesIn, ALfloat (*SamplesOut)[OUTPUTCHANNELS]) { ALmodulatorState *state = (ALmodulatorState*)effect; - const ALfloat gain = Slot->Gain * state->scalar; + const ALfloat gain = Slot->Gain; const ALuint step = state->step; ALuint index = state->index; ALfloat samp; |