]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
byteswap S16LE sound data on load once, not twice :)
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 26 Feb 2012 15:06:40 +0000 (15:06 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 26 Feb 2012 15:06:40 +0000 (15:06 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11734 d7cf8633-e32d-0410-b094-e92efae38249

snd_wav.c

index 258b501c4d7cf08c6e132f7987f481147c6bb5b5..6f861913335007bb2f155a68aa5b672c16cdaaee 100644 (file)
--- 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;