From 8a64f071213f387c4675012ec1df51b9295564b3 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 5 Sep 2016 02:02:14 -0700 Subject: Use a predefined identity matrix --- Alc/effects/compressor.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'Alc/effects/compressor.c') diff --git a/Alc/effects/compressor.c b/Alc/effects/compressor.c index 1426ea70..ab0a4216 100644 --- a/Alc/effects/compressor.c +++ b/Alc/effects/compressor.c @@ -78,23 +78,15 @@ static ALboolean ALcompressorState_deviceUpdate(ALcompressorState *state, ALCdev static ALvoid ALcompressorState_update(ALcompressorState *state, const ALCdevice *device, const ALeffectslot *slot, const ALeffectProps *props) { - aluMatrixf matrix; ALuint i; state->Enabled = props->Compressor.OnOff; - aluMatrixfSet(&matrix, - 1.0f, 0.0f, 0.0f, 0.0f, - 0.0f, 1.0f, 0.0f, 0.0f, - 0.0f, 0.0f, 1.0f, 0.0f, - 0.0f, 0.0f, 0.0f, 1.0f - ); - STATIC_CAST(ALeffectState,state)->OutBuffer = device->FOAOut.Buffer; STATIC_CAST(ALeffectState,state)->OutChannels = device->FOAOut.NumChannels; for(i = 0;i < 4;i++) - ComputeFirstOrderGains(device->FOAOut, matrix.m[i], slot->Params.Gain, - state->Gain[i]); + ComputeFirstOrderGains(device->FOAOut, IdentityMatrixf.m[i], + slot->Params.Gain, state->Gain[i]); } static ALvoid ALcompressorState_process(ALcompressorState *state, ALuint SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALuint NumChannels) -- cgit v1.2.3