Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed issue where there was a garbage sample at the end of the buffer.
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jan 13, 2012
1 parent dee5f9a commit e980758
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/audio/SDL_audiocvt.c
Expand Up @@ -295,8 +295,9 @@ SDL_ConvertStereo(SDL_AudioCVT * cvt, SDL_AudioFormat format)
{ \
const type *src = (const type *) (cvt->buf + cvt->len_cvt); \
type *dst = (type *) (cvt->buf + cvt->len_cvt * 2); \
for (i = cvt->len_cvt / sizeof(type); i; --i, --src) { \
for (i = cvt->len_cvt / sizeof(type); i; --i) { \
const type val = *src; \
src -= 1; \
dst -= 2; \
dst[0] = dst[1] = val; \
} \
Expand Down

0 comments on commit e980758

Please sign in to comment.