From: havoc Date: Sun, 26 Feb 2012 15:06:40 +0000 (+0000) Subject: byteswap S16LE sound data on load once, not twice :) X-Git-Tag: xonotic-v0.6.0~5 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=87260e9d8e0b296c2a6360c3b38b699c6b3d7066;p=xonotic%2Fdarkplaces.git byteswap S16LE sound data on load once, not twice :) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11734 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=e25e94b0f38884e38eb25b5c2a2c59084af68800 --- diff --git a/snd_wav.c b/snd_wav.c index 258b501c..6f861913 100644 --- a/snd_wav.c +++ b/snd_wav.c @@ -303,19 +303,6 @@ qboolean S_LoadWavFile (const char *filename, sfx_t *sfx) //if (info.channels == 2) // Log_Printf("stereosounds.log", "%s\n", sfx->name); - // We must convert the WAV data from little endian - // to the machine endianess before resampling it - if (info.width == 2 && mem_bigendian) - { - unsigned int len, i; - short* ptr; - - len = info.samples * info.channels; - ptr = (short*)(data + info.dataofs); - for (i = 0; i < len; i++) - ptr[i] = LittleShort (ptr[i]); - } - sfx->format.speed = info.rate; sfx->format.width = info.width; sfx->format.channels = info.channels;