int SimpleRateConverter<stereo, reverseStereo>::flow(AudioStream &input, st_sample_t *obuf, st_size_t osamp, st_volume_t vol_l, st_volume_t vol_r) { #ifdef DEBUG_RATECONV debug("Simple st=%d rev=%d", stereo, reverseStereo); #endif st_sample_t *ostart = obuf; if (!stereo) { obuf = ARM_SimpleRate_M(input, &SimpleRate_readFudge, &sr, obuf, osamp, vol_l, vol_r); } else if (reverseStereo) { obuf = ARM_SimpleRate_R(input, &SimpleRate_readFudge, &sr, obuf, osamp, vol_l, vol_r); } else { obuf = ARM_SimpleRate_S(input, &SimpleRate_readFudge, &sr, obuf, osamp, vol_l, vol_r); } return (obuf-ostart)/2; }
int SimpleRateConverter<stereo, reverseStereo>::flow(AudioStream &input, st_sample_t *obuf, st_size_t osamp, st_volume_t vol_l, st_volume_t vol_r) { #ifdef DEBUG_RATECONV fprintf(stderr, "Simple st=%d rev=%d\n", stereo, reverseStereo); fflush(stderr); #endif if (!stereo) { ARM_SimpleRate_M(input, &SimpleRate_readFudge, &sr, obuf, osamp, vol_l, vol_r); } else if (reverseStereo) { ARM_SimpleRate_R(input, &SimpleRate_readFudge, &sr, obuf, osamp, vol_l, vol_r); } else { ARM_SimpleRate_S(input, &SimpleRate_readFudge, &sr, obuf, osamp, vol_l, vol_r); } return (ST_SUCCESS); }