diff options
Diffstat (limited to 'Alc/effects/dedicated.c')
-rw-r--r-- | Alc/effects/dedicated.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Alc/effects/dedicated.c b/Alc/effects/dedicated.c index 9fd10177..20acfdcf 100644 --- a/Alc/effects/dedicated.c +++ b/Alc/effects/dedicated.c @@ -59,9 +59,9 @@ static ALvoid ALdedicatedState_update(ALdedicatedState *state, const ALCdevice * int idx; if((idx=GetChannelIdxByName(device->RealOut, LFE)) != -1) { - state->gains[idx] = Gain; STATIC_CAST(ALeffectState,state)->OutBuffer = device->RealOut.Buffer; STATIC_CAST(ALeffectState,state)->OutChannels = device->RealOut.NumChannels; + state->gains[idx] = Gain; } } else if(Slot->EffectType == AL_EFFECT_DEDICATED_DIALOGUE) @@ -71,23 +71,22 @@ static ALvoid ALdedicatedState_update(ALdedicatedState *state, const ALCdevice * * plays from the front-center location. */ if((idx=GetChannelIdxByName(device->RealOut, FrontCenter)) != -1) { - state->gains[idx] = Gain; STATIC_CAST(ALeffectState,state)->OutBuffer = device->RealOut.Buffer; STATIC_CAST(ALeffectState,state)->OutChannels = device->RealOut.NumChannels; + state->gains[idx] = Gain; } else { + STATIC_CAST(ALeffectState,state)->OutBuffer = device->Dry.Buffer; + STATIC_CAST(ALeffectState,state)->OutChannels = device->Dry.NumChannels; if((idx=GetChannelIdxByName(device->Dry, FrontCenter)) != -1) state->gains[idx] = Gain; else { ALfloat coeffs[MAX_AMBI_COEFFS]; CalcXYZCoeffs(0.0f, 0.0f, -1.0f, coeffs); - ComputePanningGains(device->Dry.AmbiCoeffs, device->Dry.NumChannels, - device->Dry.CoeffCount, coeffs, Gain, state->gains); + ComputePanningGains(device->Dry, coeffs, Gain, state->gains); } - STATIC_CAST(ALeffectState,state)->OutBuffer = device->Dry.Buffer; - STATIC_CAST(ALeffectState,state)->OutChannels = device->Dry.NumChannels; } } } |