Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Fixed issue where there was a garbage sample at the end of the buffer.

  • Loading branch information
slouken committed Jan 13, 2012
1 parent dee5f9a commit e9807587141ff64303d8c816a6f7ea8abf712fb3
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/audio/SDL_audiocvt.c
@@ -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; \
} \

0 comments on commit e980758

Please sign in to comment.