src/audio/SDL_audiocvt.c
changeset 1428 5f52867ba65c
parent 1402 d910939febfa
child 1659 14717b52abc0
     1.1 --- a/src/audio/SDL_audiocvt.c	Fri Feb 24 17:03:06 2006 +0000
     1.2 +++ b/src/audio/SDL_audiocvt.c	Fri Feb 24 18:24:57 2006 +0000
     1.3 @@ -47,7 +47,7 @@
     1.4  				if ( sample > 255 ) {
     1.5  					*dst = 255;
     1.6  				} else {
     1.7 -					*dst = sample;
     1.8 +					*dst = (Uint8)sample;
     1.9  				}
    1.10  				src += 2;
    1.11  				dst += 1;
    1.12 @@ -68,7 +68,7 @@
    1.13  				if ( sample < -128 ) {
    1.14  					*dst = -128;
    1.15  				} else {
    1.16 -					*dst = sample;
    1.17 +					*dst = (Sint8)sample;
    1.18  				}
    1.19  				src += 2;
    1.20  				dst += 1;
    1.21 @@ -185,10 +185,8 @@
    1.22  			src = cvt->buf;
    1.23  			dst = cvt->buf;
    1.24  			for ( i=cvt->len_cvt/6; i; --i ) {
    1.25 -				lsample = src[0];
    1.26 -				rsample = src[1];
    1.27 -				dst[0] = lsample;
    1.28 -				dst[1] = rsample;
    1.29 +				dst[0] = src[0];
    1.30 +				dst[1] = src[1];
    1.31  				src += 6;
    1.32  				dst += 2;
    1.33  			}
    1.34 @@ -201,10 +199,8 @@
    1.35  			src = (Sint8 *)cvt->buf;
    1.36  			dst = (Sint8 *)cvt->buf;
    1.37  			for ( i=cvt->len_cvt/6; i; --i ) {
    1.38 -				lsample = src[0];
    1.39 -				rsample = src[1];
    1.40 -				dst[0] = lsample;
    1.41 -				dst[1] = rsample;
    1.42 +				dst[0] = src[0];
    1.43 +				dst[1] = src[1];
    1.44  				src += 6;
    1.45  				dst += 2;
    1.46  			}
    1.47 @@ -305,10 +301,8 @@
    1.48  			src = cvt->buf;
    1.49  			dst = cvt->buf;
    1.50  			for ( i=cvt->len_cvt/4; i; --i ) {
    1.51 -				lsample = src[0];
    1.52 -				rsample = src[1];
    1.53 -				dst[0] = lsample;
    1.54 -				dst[1] = rsample;
    1.55 +				dst[0] = src[0];
    1.56 +				dst[1] = src[1];
    1.57  				src += 4;
    1.58  				dst += 2;
    1.59  			}
    1.60 @@ -321,10 +315,8 @@
    1.61  			src = (Sint8 *)cvt->buf;
    1.62  			dst = (Sint8 *)cvt->buf;
    1.63  			for ( i=cvt->len_cvt/4; i; --i ) {
    1.64 -				lsample = src[0];
    1.65 -				rsample = src[1];
    1.66 -				dst[0] = lsample;
    1.67 -				dst[1] = rsample;
    1.68 +				dst[0] = src[0];
    1.69 +				dst[1] = src[1];
    1.70  				src += 4;
    1.71  				dst += 2;
    1.72  			}