//if (info.channels == 2)
// Log_Printf("stereosounds.log", "%s\n", sfx->name);
-#if BYTE_ORDER != LITTLE_ENDIAN
// We must convert the WAV data from little endian
// to the machine endianess before resampling it
- if (info.width == 2)
+ if (info.width == 2 && mem_bigendian)
{
unsigned int len, i;
short* ptr;
for (i = 0; i < len; i++)
ptr[i] = LittleShort (ptr[i]);
}
-#endif
wav_format.speed = info.rate;
wav_format.width = info.width;
if (info.loopstart < 0)
sfx->loopstart = sfx->total_length;
else
- sfx->loopstart = (double)info.loopstart * (double)sb->format.speed / (double)info.rate;
+ sfx->loopstart = (unsigned int) ((double)info.loopstart * (double)sb->format.speed / (double)info.rate);
sfx->loopstart = min(sfx->loopstart, sfx->total_length);
sfx->flags &= ~SFXFLAG_STREAMED;