diff options
author | Chris Robinson <[email protected]> | 2009-05-29 01:32:54 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2009-05-29 01:32:54 -0700 |
commit | 34ea7eba9e5f750aaa18713c51da852555064d39 (patch) | |
tree | fbb4a356a02fbe508fc241ac3b31a62d5dd841d4 /Alc/ALu.c | |
parent | 6d3ba44f55772cc6a545ca2c9407833ed85233f6 (diff) |
Add preliminary support for the EAX Reverb effect
Not all parameters are supported yet, though it is a little more fuctional than
standard reverb
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r-- | Alc/ALu.c | 25 |
1 files changed, 14 insertions, 11 deletions
@@ -743,11 +743,6 @@ static ALvoid CalcSourceParams(const ALCcontext *ALContext, wetgainhf[i] = DryGainHF; } - // Note that this is really applied by the effect slot. However, - // it's easier (more optimal) to handle it here. - if(ALSource->Send[i].Slot->effect.type == AL_EFFECT_REVERB) - wetgainhf[i] *= ALSource->Send[0].Slot->effect.Reverb.GainHF; - switch(ALSource->Send[i].WetFilter.type) { case AL_FILTER_LOWPASS: @@ -1025,9 +1020,9 @@ ALvoid aluMixData(ALCcontext *ALContext,ALvoid *buffer,ALsizei size,ALenum forma if(ALSource->FirstStart && DataPosInt == 0 && DataPosFrac == 0) { for(i = 0;i < OUTPUTCHANNELS;i++) - dryGainStep[i] = 0; + dryGainStep[i] = 0.0f; for(i = 0;i < MAX_SENDS;i++) - wetGainStep[i] = 0; + wetGainStep[i] = 0.0f; } else { @@ -1315,10 +1310,18 @@ ALvoid aluMixData(ALCcontext *ALContext,ALvoid *buffer,ALsizei size,ALenum forma // effect slot processing while(ALEffectSlot) { - if(ALEffectSlot->effect.type == AL_EFFECT_REVERB) - VerbProcess(ALEffectSlot->ReverbState, SamplesToDo, ALEffectSlot->WetBuffer, DryBuffer); - else if(ALEffectSlot->effect.type == AL_EFFECT_ECHO) - EchoProcess(ALEffectSlot->EchoState, SamplesToDo, ALEffectSlot->WetBuffer, DryBuffer); + switch(ALEffectSlot->effect.type) + { + case AL_EFFECT_REVERB: + VerbProcess(ALEffectSlot->ReverbState, SamplesToDo, ALEffectSlot->WetBuffer, DryBuffer); + break; + case AL_EFFECT_ECHO: + EchoProcess(ALEffectSlot->EchoState, SamplesToDo, ALEffectSlot->WetBuffer, DryBuffer); + break; + case AL_EFFECT_EAXREVERB: + EAXVerbProcess(ALEffectSlot->ReverbState, SamplesToDo, ALEffectSlot->WetBuffer, DryBuffer); + break; + } for(i = 0;i < SamplesToDo;i++) ALEffectSlot->WetBuffer[i] = 0.0f; |