This program implements an interpolator used for the compensation of frequency drifts. The technique is based on a first-order recursive filter. There is one input parameter to set the amount of drift to be compensated for. The amount of drift is usually in the range of few percent down to few ppm.
The code is written in fixed-point C using Q15 and Q31 arithmetics. When ported on CortexM4 the code is processing one sample every 20 cycles (1 MHz CPU load for a stream at 48kHz). This number is obtained without the need to optimize the critical loops in assembly language.
The technical documentation is located here.
The demonstration files and executable (BATCH_DRIFT.BAT) are located here