diff options
author | Chris Robinson <[email protected]> | 2016-01-25 06:11:51 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2016-01-25 06:11:51 -0800 |
commit | f547ef6d391be5e0cd3e0477c3f8de859a47df69 (patch) | |
tree | d135e13f3a204af7eaac97a71744e308da661fe2 /Alc/effects/dedicated.c | |
parent | 79e0f3e747880a3e7d8342a8602b796b84c0f322 (diff) |
Separate calculating ambisonic coefficients from the panning gains
Diffstat (limited to 'Alc/effects/dedicated.c')
-rw-r--r-- | Alc/effects/dedicated.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Alc/effects/dedicated.c b/Alc/effects/dedicated.c index dc581ace..fdc20601 100644 --- a/Alc/effects/dedicated.c +++ b/Alc/effects/dedicated.c @@ -45,7 +45,7 @@ static ALboolean ALdedicatedState_deviceUpdate(ALdedicatedState *UNUSED(state), return AL_TRUE; } -static ALvoid ALdedicatedState_update(ALdedicatedState *state, ALCdevice *device, const ALeffectslot *Slot) +static ALvoid ALdedicatedState_update(ALdedicatedState *state, const ALCdevice *device, const ALeffectslot *Slot) { ALfloat Gain; ALuint i; @@ -69,8 +69,9 @@ static ALvoid ALdedicatedState_update(ALdedicatedState *state, ALCdevice *device state->gains[idx] = Gain; else { - static const ALfloat front_dir[3] = { 0.0f, 0.0f, -1.0f }; - ComputeDirectionalGains(device, front_dir, Gain, state->gains); + ALfloat coeffs[MAX_AMBI_COEFFS]; + CalcXYZCoeffs(0.0f, 0.0f, -1.0f, coeffs); + ComputePanningGains(device->AmbiCoeffs, device->NumChannels, coeffs, Gain, state->gains); } } } |