aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/effects/echo.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2016-01-27 08:16:47 -0800
committerChris Robinson <[email protected]>2016-01-27 08:16:47 -0800
commit2fa3ae85c9a4050eab3a4f140fb6accd0a02ce85 (patch)
tree1aeb9e34ba5a5081de853f84a9d03159ef48fd00 /Alc/effects/echo.c
parentfd387beda183c2c443ec45f7193f81cf82ede164 (diff)
Pass a pointer to the input samples array for effect processing
Diffstat (limited to 'Alc/effects/echo.c')
-rw-r--r--Alc/effects/echo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Alc/effects/echo.c b/Alc/effects/echo.c
index e2bb6407..ebb6cf12 100644
--- a/Alc/effects/echo.c
+++ b/Alc/effects/echo.c
@@ -111,7 +111,7 @@ static ALvoid ALechoState_update(ALechoState *state, const ALCdevice *Device, co
ComputePanningGains(Device->AmbiCoeffs, Device->NumChannels, coeffs, gain, state->Gain[1]);
}
-static ALvoid ALechoState_process(ALechoState *state, ALuint SamplesToDo, const ALfloat *restrict SamplesIn, ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALuint NumChannels)
+static ALvoid ALechoState_process(ALechoState *state, ALuint SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALuint NumChannels)
{
const ALuint mask = state->BufferLength-1;
const ALuint tap1 = state->Tap[0].delay;
@@ -135,7 +135,7 @@ static ALvoid ALechoState_process(ALechoState *state, ALuint SamplesToDo, const
// Apply damping and feedback gain to the second tap, and mix in the
// new sample
- smp = ALfilterState_processSingle(&state->Filter, temps[i][1]+SamplesIn[i+base]);
+ smp = ALfilterState_processSingle(&state->Filter, temps[i][1]+SamplesIn[0][i+base]);
state->SampleBuffer[offset&mask] = smp * state->FeedGain;
offset++;
}