diff options
author | Chris Robinson <[email protected]> | 2013-06-10 05:57:27 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2013-06-10 05:57:27 -0700 |
commit | 817ca82e4bb166e17e3e5b707df01ba325725116 (patch) | |
tree | 90a15f5469cb9886f368c708d62fa630ab7f2bee /Alc | |
parent | 68898dad1ea80320f9e31624c22d7d372b2ce38f (diff) |
Fix input and feedback in the echo effect
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/effects/echo.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Alc/effects/echo.c b/Alc/effects/echo.c index 29087439..6d6d70fb 100644 --- a/Alc/effects/echo.c +++ b/Alc/effects/echo.c @@ -78,8 +78,7 @@ static ALboolean ALechoState_deviceUpdate(ALechoState *state, ALCdevice *Device) void *temp; temp = realloc(state->SampleBuffer, maxlen * sizeof(ALfloat)); - if(!temp) - return AL_FALSE; + if(!temp) return AL_FALSE; state->SampleBuffer = temp; state->BufferLength = maxlen; } @@ -148,8 +147,9 @@ 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]); + smp = ALfilterState_processSingle(&state->Filter, temps[i][1]+SamplesIn[i+base]); state->SampleBuffer[offset&mask] = smp * state->FeedGain; + offset++; } for(k = 0;k < MaxChannels;k++) |