sonic_lite.c
static void overlapAdd(int numSamples, short *out, short *rampDown, short *rampUp) {
  short *o;
  short *u;
  short *d;
  int t;

  o = out;
  u = rampUp;
  d = rampDown;
  for (t = 0; t < numSamples; t++) {
    *o = (*d * (numSamples - t) + *u * t) / numSamples;
    o++;
    d++;
    u++;
  }
}
/* Overlap two sound segments, ramp the volume of one down, while ramping the
   other one from zero up, and add them, storing the result at the output. */
Overlap two sound segments, ramp the volume of one down, while ramping the
other one from zero up, and add them, storing the result at the output.
Overlap two sound segments ramp the volume of one down while ramping the other one from zero up and add them storing the result at the output .
static void overlapAdd(int numSamples, short *out, short *rampDown, short *rampUp) {
  short *o;
  short *u;
  short *d;
  int t;
  o = out;
  u = rampUp;
  d = rampDown;
  for (t = 0; t < numSamples; t++) {
    *o = (*d * (numSamples - t) + *u * t) / numSamples;
    o++;
    d++;
    u++;
  }
}
static void overlapAdd ( int numSamples , short * out , short * rampDown , short * rampUp ) { short * o ; short * u ; short * d ; int t ; o = out ; u = rampUp ; d = rampDown ; for ( t = 0 ; t < numSamples ; t ++ ) { * o = ( * d * ( numSamples - t ) + * u * t ) / numSamples ; o ++ ; d ++ ; u ++ ; } }
Overlap two sound segments, ramp the volume of one down, while ramping the
other one from zero up, and add them, storing the result at the output.
Overlap two sound segments ramp the volume of one down while ramping the other one from zero up and add them storing the result at the output .