A system and method for adaptive estimation and compensation of clock
drift in echo cancellers is provided. The invention includes an acoustic
echo cancellation system with a built in adaptive clock drift
compensation system. The acoustic echo cancellation system has an AEC
component that performs acoustic echo cancellation on data from a capture
buffer, by also using information derived from a render buffer. The clock
drift compensation system has access to this capture buffer and render
buffer. The clock drift compensation system includes a clock drift
compensator that calculates, based on the current location of the capture
data being processed by the AEC component as well as additional
information, the ideal location in the render buffer from which the AEC
component should process data. The clock drift compensator further
adjusts the current location in the render buffer from which the AEC
component processes data based, at least in part, upon this ideal
location. The clock drift compensator can further detect and correct for
glitches in the hardware positions received from the render and capture
devices.