comparison src/audio/SDL_audiocvt.c @ 3863:4e23720e4278 SDL-1.2

Only convert endianness if both src and dest are 16bits
author Patrice Mandin <patmandin@gmail.com>
date Sat, 16 Sep 2006 09:14:25 +0000
parents 290b5baf2fca
children 74e828c64315
comparison
equal deleted inserted replaced
3862:3c4ccd884117 3863:4e23720e4278
1372 cvt->len_mult = 1; 1372 cvt->len_mult = 1;
1373 cvt->len_ratio = 1.0; 1373 cvt->len_ratio = 1.0;
1374 1374
1375 /* First filter: Endian conversion from src to dst */ 1375 /* First filter: Endian conversion from src to dst */
1376 if ( (src_format & 0x1000) != (dst_format & 0x1000) 1376 if ( (src_format & 0x1000) != (dst_format & 0x1000)
1377 && ((src_format & 0xff) != 8) ) { 1377 && ((src_format & 0xff) == 16) && ((dst_format & 0xff) == 16)) {
1378 cvt->filters[cvt->filter_index++] = SDL_ConvertEndian; 1378 cvt->filters[cvt->filter_index++] = SDL_ConvertEndian;
1379 } 1379 }
1380 1380
1381 /* Second filter: Sign conversion -- signed/unsigned */ 1381 /* Second filter: Sign conversion -- signed/unsigned */
1382 if ( (src_format & 0x8000) != (dst_format & 0x8000) ) { 1382 if ( (src_format & 0x8000) != (dst_format & 0x8000) ) {