That will depend on the platform. We only use drift compensation with
the Windows Wave interface. Have a look at:
http://code.google.com/p/webrtc/source/browse/trunk/src/modules/audio_device/main/source/win/audio_device_wave_win.cc
particularly GetClockDrift().
At first it appears that we're using it in the Windows Core Audio
interface as well, but we're really just compensating for a mismatch
between 44.1 and 44 kHz sampling rates.
I've been adding some code in PulseAudio (where we're using the webrtc
canceller implementation as an option) to do drift estimation.
Currently, it fails at >100ms latency (which shouldn't be a big
constraint), and there should be room for improvement, but if it
helps, you could take a look at what I've done at --
http://cgit.collabora.com/git/user/arun/pulseaudio.git/commit/?h=webrtc&id=a0e467da585da0aaaffdb7bd4ec863da05f71942
Also, possibly offtopic for this list, but for whatever it's worth,
I've tried running the PulseAudio canceller module using the webrtc
engine between my internal speakers and a couple of USB capture
devices I have. This was without using drift compensation I linked to
above. The drift triggers our resync code (which drops some samples to
bring us withing some "acceptable" delta between the playback and
capture streams) every few seconds (which means it's really small
amounts of drift). There isn't any noticeable glitch at resync time
(which we have seen with the speex canceller). I'm still looking for a
device with large enough drift to be actually problematic.
Cheers,
--
Arun Raghavan
http://arunraghavan.net/
(Ford_Prefect | Gentoo) & (arunsr | GNOME)