From 87260e9d8e0b296c2a6360c3b38b699c6b3d7066 Mon Sep 17 00:00:00 2001 From: havoc Date: Sun, 26 Feb 2012 15:06:40 +0000 Subject: [PATCH] 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 --- snd_wav.c | 13 ------------- 1 file changed, 13 deletions(-) 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; -- 2.39.2