Commit ecdc6c1207ba4aab706352336a945890bb8018e8

Ryan C. Gordon 2017-01-23T12:14:28

audio: Fixed copy/paste bug in float32->sint16/SSE2 scalar leftover code.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/audio/SDL_audiotypecvt.c b/src/audio/SDL_audiotypecvt.c
index 2ebba0a..8f8378c 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++;
     }