Fixed issue where there was a garbage sample at the end of the buffer.
This commit is contained in:
parent
a9eeb84da2
commit
17d38b0d37
1 changed files with 2 additions and 1 deletions
|
@ -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; \
|
||||
} \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue