- if (stepscale == 1/* && inwidth == 1*/ && sc->width == 1)
- {
-// fast special case
- // LordHavoc: I do not serve the readability gods...
- int *indata, *outdata;
- int count4, count1;
- count1 = outcount << sc->stereo;
- count4 = count1 >> 2;
- indata = (void *)data;
- outdata = (void *)sc->data;
- while (count4--)
- *outdata++ = *indata++ ^ 0x80808080;
- if (count1 & 2)
- ((short*)outdata)[0] = ((short*)indata)[0] ^ 0x8080;
- if (count1 & 1)
- ((char*)outdata)[2] = ((char*)indata)[2] ^ 0x80;
- /*
- if (sc->stereo) // LordHavoc: stereo sound support
- {
- for (i=0 ; i<(outcount<<1) ; i++)
- ((signed char *)sc->data)[i] = (int)( (unsigned char)(data[i]) - 128);
- }
- else
- {
- for (i=0 ; i<outcount ; i++)
- ((signed char *)sc->data)[i] = (int)( (unsigned char)(data[i]) - 128);
- }
- */
- }
- else if (stepscale == 1/* && inwidth == 2*/ && sc->width == 2) // LordHavoc: quick case for 16bit