diff options
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/ALc.c | 3 | ||||
-rw-r--r-- | Alc/alcReverb.c | 10 |
2 files changed, 12 insertions, 1 deletions
@@ -564,6 +564,9 @@ static void alc_initconfig(void) if(DefaultResampler >= RESAMPLER_MAX || DefaultResampler <= RESAMPLER_MIN) DefaultResampler = RESAMPLER_DEFAULT; + ReverbBoost *= aluPow(10.0f, GetConfigValueFloat("reverb", "boost", 0.0f) / + 20.0f); + devs = GetConfigValue(NULL, "drivers", ""); if(devs[0]) { diff --git a/Alc/alcReverb.c b/Alc/alcReverb.c index 38586357..4b7aa1c4 100644 --- a/Alc/alcReverb.c +++ b/Alc/alcReverb.c @@ -135,6 +135,11 @@ typedef struct ALverbState { ALfloat *Gain; } ALverbState; +/* This is a user config option for modifying the overall output of the reverb + * effect. + */ +ALfloat ReverbBoost = 1.0f; + /* This coefficient is used to define the maximum frequency range controlled * by the modulation depth. The current value of 0.1 will allow it to swing * from 0.9x to 1.1x. This value must be below 1. At 1 it will cause the @@ -602,6 +607,8 @@ static ALvoid Update3DPanning(const ALCdevice *Device, const ALfloat *Reflection ALuint index; ALint pos; + Gain *= ReverbBoost; + // Attenuate non-directional reverb according to the number of channels ambientGain = aluSqrt(2.0f/Device->NumChan); @@ -1106,7 +1113,8 @@ static ALvoid VerbUpdate(ALeffectState *effect, ALCcontext *Context, const ALeff // Update channel gains gain = Slot->Gain; - gain *= aluSqrt(2.0/Device->NumChan); + gain *= aluSqrt(2.0f/Device->NumChan); + gain *= ReverbBoost; for(index = 0;index < MAXCHANNELS;index++) State->Gain[index] = 0.0f; for(index = 0;index < Device->NumChan;index++) |