From 8ac2d34706d1dea7c33f2b33c156cc23dde7b197 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 21 Feb 2019 04:23:01 -0800 Subject: Allow processing some effects in higher order ambisonics Reverb notably is still only first-order (any higher order channels are dropped, and it writes to FOAOut). But others, like the equalizer, work on all available channels. --- Alc/alc.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Alc/alc.cpp') diff --git a/Alc/alc.cpp b/Alc/alc.cpp index 99247753..b68a16e0 100644 --- a/Alc/alc.cpp +++ b/Alc/alc.cpp @@ -2068,7 +2068,7 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList) if(context->DefaultSlot) { ALeffectslot *slot = context->DefaultSlot.get(); - aluInitEffectPanning(slot); + aluInitEffectPanning(slot, device); EffectState *state{slot->Effect.State}; state->mOutBuffer = device->Dry.Buffer; @@ -2091,7 +2091,7 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList) usemask &= ~(1_u64 << idx); - aluInitEffectPanning(slot); + aluInitEffectPanning(slot, device); EffectState *state{slot->Effect.State}; state->mOutBuffer = device->Dry.Buffer; @@ -3453,7 +3453,7 @@ ALC_API ALCcontext* ALC_APIENTRY alcCreateContext(ALCdevice *device, const ALCin void *ptr{al_calloc(16, sizeof(ALeffectslot))}; ALContext->DefaultSlot = std::unique_ptr{new (ptr) ALeffectslot{}}; if(InitEffectSlot(ALContext->DefaultSlot.get()) == AL_NO_ERROR) - aluInitEffectPanning(ALContext->DefaultSlot.get()); + aluInitEffectPanning(ALContext->DefaultSlot.get(), dev.get()); else { ALContext->DefaultSlot = nullptr; -- cgit v1.2.3