+ in_ptr_short++;
+ out_ptr += sizeof (short);
+ }
+
+ samplefrac += fracstep;
+ }
+ }
+ // 8 bit samples
+ else // if (in_format->width == 1)
+ {
+ const unsigned char* in_ptr_byte;
+
+ // Convert up to 1 sec of sound
+ for (i = 0; i < interpolation_limit; i++)
+ {
+ srcsample = (samplefrac >> FRACTIONAL_BITS) * in_format->channels;
+ in_ptr_byte = &((const unsigned char*)in_ptr)[srcsample];
+
+ for (j = 0; j < in_format->channels; j++)
+ {
+ int a, b;
+
+ a = *in_ptr_byte - 128;
+ b = *(in_ptr_byte + in_format->channels) - 128;
+ *((signed char*)out_ptr) = (((b - a) * (samplefrac & FRACTIONAL_MASK)) >> FRACTIONAL_BITS) + a;
+
+ in_ptr_byte++;