diff src/audio/SDL_audiocvt.c @ 1428:5f52867ba65c

Update for Visual C++ 6.0
author Sam Lantinga <slouken@libsdl.org>
date Fri, 24 Feb 2006 18:24:57 +0000
parents d910939febfa
children 14717b52abc0
line wrap: on
line diff
--- a/src/audio/SDL_audiocvt.c	Fri Feb 24 17:03:06 2006 +0000
+++ b/src/audio/SDL_audiocvt.c	Fri Feb 24 18:24:57 2006 +0000
@@ -47,7 +47,7 @@
 				if ( sample > 255 ) {
 					*dst = 255;
 				} else {
-					*dst = sample;
+					*dst = (Uint8)sample;
 				}
 				src += 2;
 				dst += 1;
@@ -68,7 +68,7 @@
 				if ( sample < -128 ) {
 					*dst = -128;
 				} else {
-					*dst = sample;
+					*dst = (Sint8)sample;
 				}
 				src += 2;
 				dst += 1;
@@ -185,10 +185,8 @@
 			src = cvt->buf;
 			dst = cvt->buf;
 			for ( i=cvt->len_cvt/6; i; --i ) {
-				lsample = src[0];
-				rsample = src[1];
-				dst[0] = lsample;
-				dst[1] = rsample;
+				dst[0] = src[0];
+				dst[1] = src[1];
 				src += 6;
 				dst += 2;
 			}
@@ -201,10 +199,8 @@
 			src = (Sint8 *)cvt->buf;
 			dst = (Sint8 *)cvt->buf;
 			for ( i=cvt->len_cvt/6; i; --i ) {
-				lsample = src[0];
-				rsample = src[1];
-				dst[0] = lsample;
-				dst[1] = rsample;
+				dst[0] = src[0];
+				dst[1] = src[1];
 				src += 6;
 				dst += 2;
 			}
@@ -305,10 +301,8 @@
 			src = cvt->buf;
 			dst = cvt->buf;
 			for ( i=cvt->len_cvt/4; i; --i ) {
-				lsample = src[0];
-				rsample = src[1];
-				dst[0] = lsample;
-				dst[1] = rsample;
+				dst[0] = src[0];
+				dst[1] = src[1];
 				src += 4;
 				dst += 2;
 			}
@@ -321,10 +315,8 @@
 			src = (Sint8 *)cvt->buf;
 			dst = (Sint8 *)cvt->buf;
 			for ( i=cvt->len_cvt/4; i; --i ) {
-				lsample = src[0];
-				rsample = src[1];
-				dst[0] = lsample;
-				dst[1] = rsample;
+				dst[0] = src[0];
+				dst[1] = src[1];
 				src += 4;
 				dst += 2;
 			}