diff options
author | Chris Robinson <[email protected]> | 2016-01-27 08:16:47 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2016-01-27 08:16:47 -0800 |
commit | 2fa3ae85c9a4050eab3a4f140fb6accd0a02ce85 (patch) | |
tree | 1aeb9e34ba5a5081de853f84a9d03159ef48fd00 /Alc/effects/compressor.c | |
parent | fd387beda183c2c443ec45f7193f81cf82ede164 (diff) |
Pass a pointer to the input samples array for effect processing
Diffstat (limited to 'Alc/effects/compressor.c')
-rw-r--r-- | Alc/effects/compressor.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Alc/effects/compressor.c b/Alc/effects/compressor.c index 52a6324d..6c3b8375 100644 --- a/Alc/effects/compressor.c +++ b/Alc/effects/compressor.c @@ -62,7 +62,7 @@ static ALvoid ALcompressorState_update(ALcompressorState *state, const ALCdevice ComputeAmbientGains(device->AmbiCoeffs, device->NumChannels, slot->Gain, state->Gain); } -static ALvoid ALcompressorState_process(ALcompressorState *state, ALuint SamplesToDo, const ALfloat *SamplesIn, ALfloat (*SamplesOut)[BUFFERSIZE], ALuint NumChannels) +static ALvoid ALcompressorState_process(ALcompressorState *state, ALuint SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALuint NumChannels) { ALuint it, kt; ALuint base; @@ -79,7 +79,7 @@ static ALvoid ALcompressorState_process(ALcompressorState *state, ALuint Samples for(it = 0;it < td;it++) { - smp = SamplesIn[it+base]; + smp = SamplesIn[0][it+base]; amplitude = fabsf(smp); if(amplitude > gain) @@ -100,7 +100,7 @@ static ALvoid ALcompressorState_process(ALcompressorState *state, ALuint Samples for(it = 0;it < td;it++) { - smp = SamplesIn[it+base]; + smp = SamplesIn[0][it+base]; amplitude = 1.0f; if(amplitude > gain) |