diff options
author | Chris Robinson <[email protected]> | 2010-04-11 15:20:46 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2010-04-11 15:20:46 -0700 |
commit | e0fa4979487f6adc566a4e1b18e2caeeee8843ee (patch) | |
tree | 3e7fc41580acd170da9070cdc08f3ffdffbaf901 /Alc/alcModulator.c | |
parent | f082c7353939d233e134d1403af13dc67d8cd853 (diff) |
Use a linear scaling when sending multi-channel sources to auxiliary slots
Diffstat (limited to 'Alc/alcModulator.c')
-rw-r--r-- | Alc/alcModulator.c | 10 |
1 files changed, 3 insertions, 7 deletions
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; |