From ecdc6c1207ba4aab706352336a945890bb8018e8 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Mon, 23 Jan 2017 12:14:28 -0500 Subject: [PATCH] audio: Fixed copy/paste bug in float32->sint16/SSE2 scalar leftover code. --- src/audio/SDL_audiotypecvt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/audio/SDL_audiotypecvt.c b/src/audio/SDL_audiotypecvt.c index 2ebba0a28..8f8378c43 100644 --- a/src/audio/SDL_audiotypecvt.c +++ b/src/audio/SDL_audiotypecvt.c @@ -639,7 +639,7 @@ SDL_Convert_F32_to_S16_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) /* Finish off any leftovers with scalar operations. */ while (i) { - *dst = (((float) *src) * DIVBY32767); + *dst = (Sint16) (*src * 32767.0f); i--; src++; dst++; }