Fixed off-by-one error in SDL_ConvertStereo().
Fixes Bugzilla #561. --HG-- extra : rebase_source : a21159567a0a8a9485c46d4c67e57224948952a0
This commit is contained in:
parent
22b55373e7
commit
de2ec2b443
1 changed files with 1 additions and 2 deletions
|
@ -293,10 +293,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) { \
|
||||
const type val = *src; \
|
||||
src -= 1; \
|
||||
dst -= 2; \
|
||||
dst[0] = dst[1] = val; \
|
||||
dst[0] = dst[1] = *src; \
|
||||
} \
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue