diff options
Diffstat (limited to 'Alc/effects')
-rw-r--r-- | Alc/effects/autowah.c | 2 | ||||
-rw-r--r-- | Alc/effects/compressor.c | 2 | ||||
-rw-r--r-- | Alc/effects/distortion.c | 2 | ||||
-rw-r--r-- | Alc/effects/equalizer.c | 2 | ||||
-rw-r--r-- | Alc/effects/modulator.c | 2 | ||||
-rw-r--r-- | Alc/effects/reverb.c | 4 |
6 files changed, 7 insertions, 7 deletions
diff --git a/Alc/effects/autowah.c b/Alc/effects/autowah.c index 38a8049a..09474d56 100644 --- a/Alc/effects/autowah.c +++ b/Alc/effects/autowah.c @@ -76,7 +76,7 @@ static ALvoid ALautowahState_update(ALautowahState *state, ALCdevice *device, co state->PeakGain = slot->EffectProps.Autowah.PeakGain; state->Resonance = slot->EffectProps.Autowah.Resonance; - gain = sqrtf(1.0f / device->NumChan) * slot->Gain; + gain = sqrtf(1.0f / device->NumSpeakers) * slot->Gain; SetGains(device, gain, state->Gain); } diff --git a/Alc/effects/compressor.c b/Alc/effects/compressor.c index 6234121c..1c0054e7 100644 --- a/Alc/effects/compressor.c +++ b/Alc/effects/compressor.c @@ -61,7 +61,7 @@ static ALvoid ALcompressorState_update(ALcompressorState *state, ALCdevice *Devi state->Enabled = Slot->EffectProps.Compressor.OnOff; - gain = sqrtf(1.0f / Device->NumChan) * Slot->Gain; + gain = sqrtf(1.0f / Device->NumSpeakers) * Slot->Gain; SetGains(Device, gain, state->Gain); } diff --git a/Alc/effects/distortion.c b/Alc/effects/distortion.c index a5f876cb..04a05d99 100644 --- a/Alc/effects/distortion.c +++ b/Alc/effects/distortion.c @@ -82,7 +82,7 @@ static ALvoid ALdistortionState_update(ALdistortionState *state, ALCdevice *Devi ALfilterState_setParams(&state->bandpass, ALfilterType_BandPass, 1.0f, cutoff / (frequency*4.0f), bandwidth); - gain = sqrtf(1.0f / Device->NumChan) * Slot->Gain; + gain = sqrtf(1.0f / Device->NumSpeakers) * Slot->Gain; SetGains(Device, gain, state->Gain); } diff --git a/Alc/effects/equalizer.c b/Alc/effects/equalizer.c index ee8d65cb..5677426d 100644 --- a/Alc/effects/equalizer.c +++ b/Alc/effects/equalizer.c @@ -93,7 +93,7 @@ static ALboolean ALequalizerState_deviceUpdate(ALequalizerState *UNUSED(state), static ALvoid ALequalizerState_update(ALequalizerState *state, ALCdevice *device, const ALeffectslot *slot) { ALfloat frequency = (ALfloat)device->Frequency; - ALfloat gain = sqrtf(1.0f / device->NumChan) * slot->Gain; + ALfloat gain = sqrtf(1.0f / device->NumSpeakers) * slot->Gain; SetGains(device, gain, state->Gain); diff --git a/Alc/effects/modulator.c b/Alc/effects/modulator.c index b6b960c7..0665ad6c 100644 --- a/Alc/effects/modulator.c +++ b/Alc/effects/modulator.c @@ -149,7 +149,7 @@ static ALvoid ALmodulatorState_update(ALmodulatorState *state, ALCdevice *Device state->Filter.a[1] = -a; state->Filter.a[2] = 0.0f; - gain = sqrtf(1.0f/Device->NumChan) * Slot->Gain; + gain = sqrtf(1.0f/Device->NumSpeakers) * Slot->Gain; SetGains(Device, gain, state->Gain); } diff --git a/Alc/effects/reverb.c b/Alc/effects/reverb.c index a5683767..1e9cd550 100644 --- a/Alc/effects/reverb.c +++ b/Alc/effects/reverb.c @@ -1043,7 +1043,7 @@ static ALvoid Update3DPanning(const ALCdevice *Device, const ALfloat *Reflection /* Attenuate reverb according to its coverage (dirGain=0 will give * Gain*ambientGain, and dirGain=1 will give Gain). */ - ambientGain = minf(sqrtf(2.0f/Device->NumChan), 1.0f); + ambientGain = minf(sqrtf(2.0f/Device->NumSpeakers), 1.0f); length = earlyPan[0]*earlyPan[0] + earlyPan[1]*earlyPan[1] + earlyPan[2]*earlyPan[2]; if(length > 1.0f) @@ -1158,7 +1158,7 @@ static ALvoid ALreverbState_update(ALreverbState *State, ALCdevice *Device, cons else { /* Update channel gains */ - ALfloat gain = sqrtf(2.0f/Device->NumChan) * ReverbBoost * Slot->Gain; + ALfloat gain = sqrtf(2.0f/Device->NumSpeakers) * ReverbBoost * Slot->Gain; SetGains(Device, gain, State->Gain); } } |