Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
audio: fixed one more incorrectly-hardcoded value in the resamplers.
  • Loading branch information
icculus committed Dec 19, 2016
1 parent eda74fd commit 366c77a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/audio/SDL_audiotypecvt.c
Expand Up @@ -283,11 +283,11 @@ SDL_Downsample_Arbitrary(SDL_AudioCVT *cvt, const int channels)
SDL_memcpy(last_sample, src, cpy);

while (dst < target) {
src += 8;
src += channels;
eps += dstsize;
if ((eps << 1) >= srcsize) {
SDL_memcpy(dst, sample, cpy);
dst += 8;
dst += channels;
for (i = 0; i < channels; i++) {
sample[i] = (float) ((((double) src[i]) + ((double) last_sample[i])) * 0.5);
}
Expand Down

0 comments on commit 366c77a

Please sign in to comment.